Sri Lanka's former president Mahinda Rajapakse Tuesday denied government allegations that he attempted a coup to remain in office after it became clear that he had lost last week's election.