Image copyright EPA Image caption The outgoing president was praised by US Secretary of State John Kerry for his early concession of defeat

Former Sri Lankan leader Mahinda Rajapaksa tried to deploy the army when he realised that he had lost elections, a spokesman for new President Maithripala Sirisena has alleged.

He said that the head of the armed forces came under pressure to intervene shortly before Mr Rajapaksa conceded defeat on 47.6% of the vote.

There has been no comment from the military about the allegations.

The deposed president's spokesman denied the claims as baseless.

"There was no such attempt at all," said Mohan Samaranayake.

"In fact, at 3:30 am on 9 January when the counting was still under way, the president made an assessment and decided what the results would be," he added.

"Then he gave instructions to all secretaries about a smooth transfer of power... The politician who has made these remarks is in the habit of making baseless allegations."

Sri Lanka has largely been free of military interference in politics except for a coup in 1962 that failed to oust the government. Since then, there has been no direct military role in the government.

'Tried to remain'

President Sirisena's top aide said on Saturday that pressure had been applied by the outgoing leadership onto armed forces head Gen Daya Ratnayake to intervene in the result in the hours before Mr Rajapaksa accepted defeat.

Image copyright AFP Image caption Mr Senaratne (left) said that the outgoing president was seeking military intervention 'right up to last hour'

Image copyright AFP Image caption The new president is expected to name his ministers before and after the Pope's visit to Sri Lanka from 13 to 15 January

Image copyright AFP Image caption The election of Mr Sirisena came as a shock to Sri Lankans and the international community

"The army chief was under pressure to deploy but he did not. He declined to do anything illegal," Rajitha Senaratne, the chief spokesman for the new president, told reporters in Colombo.

"Even in the last hour, he [Rajapaksa] tried to remain in office. Only when he realised that he had no other option, he decided to go."

Mr Senaratne did not detail whether the outgoing president himself tried to contact the military chief or whether the approach was made by his younger brother, Defence Secretary Gotabhaya Rajapaksa.

Mr Senaratne also said that the new president has ordered an end to the censorship of dissident websites, the abolition of phone tapping and a stop to the surveillance of journalists and politicians.

The outgoing president was praised by US Secretary of State John Kerry for his early concession.

Mr Rajapaksa - seeking a third term in office after he changed the constitution to scrap the two-term limit - said on Twitter soon after the vote that he was working to a peaceful transition of power.

Mr Rajapaksa's supporters credit him with ending the civil war and boosting the economy, but critics say he had become increasingly authoritarian and corrupt.

Mr Sirisena is expected to make an address to the nation from the historic hill resort of Kandy on Sunday.