By Charles Haviland
BBC News, Colombo
Sri Lankan military chief Gen Sarath Fonseka has abruptly left his office two weeks earlier than he wished after the government ordered him to do so.
He said last week he wanted to retire at the end of the month because he felt the government had lost trust in him.
Sri Lankans are now waiting to see whether the general will make a presidential challenge to the incumbent, Mahinda Rajapaksa.
President Rajapaksa has appointed the air force chief in his place.
Two military aides to Gen Fonseka told the BBC he had left his office after a farewell ceremony on Monday morning.
President Rajapaksa has moved swiftly to appoint the air force chief as chief of staff in his place.
In a terse letter to Gen Fonseka on Sunday, the president's secretary told him he would lose his post and leave the army with immediate effect.
This came after the general sent a scathing letter to the president last week, complaining that his powers had been removed weeks after the government's military victory against the Tamil Tigers.
The general also said that the president appeared to mistrust him.
There is, therefore, now a major rift within the political and military machine that won the war, and the possibility that the disgruntled general may stand for president himself.
This would undermine the stance of Mr Rajapaksa's supporters that only he can make electoral capital from the war.
At the president's party convention on Sunday, Mr Rajapaksa failed to announce an imminent presidential election as he had been expected to do.
"Yesterday's patriot may become tomorrow's traitor," he told delegates, saying that attempts to divide the country would have pleased the now dead Tamil Tiger leader, Prabhakaran.