The Sri Lankan parliament has voted to remove Chief Justice Shirani Bandaranayake in a move analysts say could trigger a constitutional crisis.
The chamber, dominated by supporters of Sri Lanka's president, voted to impeach her by 155 votes to 49.
The government accuses her of corruption - an allegation she denies.
Recent court rulings said the process was unconstitutional, and she may refuse to leave. The president must now decide whether to enforce the sacking.
Critics of the government say that the judge is being victimised and the independence of the judiciary is being challenged. The government denies this.
The BBC's Charles Haviland in Colombo says that after the vote, supporters of the government took to the streets and rallied outside her official residence to celebrate her sacking.
Our correspondent says that recent rulings from the Supreme Court and the Court of Appeal have quashed the whole impeachment process, branding it "unconstitutional".
Reports say that the chief justice is already arranging her schedules for the next week in her current job in defiance of the vote.
The impeachment process has in recent weeks triggered protests by thousands of opposition supporters, lawmakers, lawyers and religious leaders.
It has also been criticised by human rights groups who have raised concerns over judicial integrity in the country.
Civil society activists and lawyers say it is a vendetta against a judge who was once favoured by the government but then made some rulings inconvenient to it.
One human rights lawyer, Lakshan Dias, told the BBC that the situation was "threatening".
"The governing party has a two-thirds majority in the legislature, and the executive is also run by a very small amount of people who are connected to the president's family. So the only impartial and independent body was, and is, the judiciary," he said.
Critics add that the impeachment is aimed at swelling President Mahinda Rajapaksa's powers still further, and an umbrella group of lawyers has urged judges not to recognise any new chief justice imposed by the government.
The International Commission of Jurists has condemned the impeachment move, saying it erodes the rule of law and has caused a "constitutional crisis of unprecedented dimensions".
The United States has said it is "deeply concerned".
Dr Bandaranayake, 54, faced an 11-member parliamentary committee in November which investigated 14 charges of financial and official misconduct against her. She was found guilty of professional misconduct the following month.