By Shihar Aneez and Ranga Sirilal
COLOMBO (Reuters) - Sri Lanka's President Mahindra Rajapaksa appointed a close ally as chief justice on Tuesday, two days after he controversially sacked the country's top judge for impeachment in the face of opposition from the Supreme Court.
Mohan Peiris, Rajapaksa's cabinet lawyer and former attorney general, was sworn-in amid tight security at the Supreme Court as dozens of lawyers held candles in protest outside the traditional building in central Colombo.
Shirani Bandaranayake's dismissal has threatened a constitutional crisis in the small island state which has slowly been finding its feet after a quarter century-long civil war ended in 2009.
The Supreme Court had ruled that Bandaranayake's removal was illegal, prompting the United States and United Nations to voice concern.
Opposition lawmakers, religious leaders and lawyers have also expressed outrage after parliament, controlled by Rajapaksa's party, voted to impeach the country's first female chief justice on Friday.
Bandaranayake's rapid fall from favor and the resulting clash between the government and judiciary has underlined the power wielded by Rajapaksa and his family in the island nation, where he has been president since 2005.
Presidential spokesman Mohan Samaranayake told Reuters that Peiris was sworn in on Tuesday.
Around 100 special taskforce police officers were deployed at the country's Supreme Court on Tuesday ahead of the swearing-in, as lawyers protested Peiris's appointment at the court's entrance.
"Let's rise against the dictatorship. Today marks the funeral of the independent judiciary," said Sunil Watagala, a member of Lawyers Collective, a judicial activist group, as other lawyers blew out candles to symbolize the start of a dark era in the court.
Lawyers Collective has urged all Supreme Court judges not to accept Peiris's appointment. The Centre for Policy Alternatives, a think tank, filed a fundamental rights petition on Tuesday to prevent Peiris accepting the appointment, which was ignored.
Bandaranayake fell from favor with Rajapaksa after she ruled that the president's younger brother, Basil Rajapaksa, would need to seek further approvals for his proposal of a $614 million development budget.
"The legal paternity is not ready to accept the puppet appointed by the authoritarian executive," said Srinath Perera, a lawyer.
Peiris, a 38-year veteran of the legal profession, has served as state counsel, attorney general and legal adviser to the Sri Lankan Cabinet of Ministers.
Political risk consultancy Eurasia Group said in a note that Peiris, known for his closeness to the Rajapaksa family, could run into a risk of being questioned by the Supreme Court or Court of Appeals on the legality of any decision he makes.
(Editing by Henry Foy and Jeremy Laurence)