The emergency rule imposed in Pakistan two years ago by Pervez Musharraf, the country's former president, was unconstitutional, the country's supreme court has ruled.
Many Pakistanis gathered at sites across the country to await the decision cheered and danced in the streets after hearing the announcement from Islamabad.
The ruling is significant as it means all steps Musharraf subsequently took were illegal, Al Jazeera correspondent Kamal Hyder said.
It also may strengthen the case for bringing treason charges against the former military ruler and could invalidate the appointments of judges made by Musharraf in the six weeks after he suspended the country's constitution on November 3, 2007.
Iftikhar Mohammed Chaudhry, the chief justice whose attempted removal by Musharraf spurred much of the political turmoil that ultimately led to the president's downfall last year, headed the 14-member bench that delivered the ruling on Friday.
Musharraf was elected to a new term as president in October 2007 while still head of the army, but the result was not validated by the supreme court.
The president's lawyers had said he would stand down as army chief once re-elected, but Musharraf declared a state of emergency the following month when it appeared the supreme court might challenge his eligibility for office.
The constitution was subsequently suspended and Chaudhry fired as chief justice.
The emergency, which was accompanied by mass detentions and harsh media restrictions, enraged an already emboldened opposition and was lifted after six weeks.
Eventually, under domestic and international pressure, Musharraf allowed elections that brought his foes to power in February 2008.
Musharraf, who stepped down as president in August 2008 under threat of impeachment, is currently staying in London.
He ignored a summons to appear before the court or send a lawyer this week to explain his actions.
In the past, he has defended the moves as being in the interest of the country.