An official says Sri Lanka's new government will investigate an alleged attempt by former President Mahinda Rajapaksa to stage a coup to stay in power when results showed he was losing last week's election.

Mangala Samaraweera, the spokesman for new President Maithripala Sirisena, said Sunday that the Cabinet would investigate the alleged coup.

Samaraweera said: "People think it was a peaceful transition. It was anything but."

He said Rajapaksa stepped down only after the army chief and the police inspector general refused to go along with him.

Samaraweeera said Rajapaksa had planned to deploy the army stop the vote count when it became clear that he was losing Thursday's election.

Rajapaksa stepped down on Friday.