Mahinda Rajapaksa, the Sri Lankan president, had accused the defeated opposition
of planning to assassinate him after he beat Sarath Fonseka, the former army general, in a bitterly contested January 26 poll.
Security forces kept Fonseka under siege while election results were announced on Wednesday, and 15 retired officers working at Fonseka's offices were later arrested.
The military official told the AFP news agency that 12 high-ranking officers, including three major-generals, were dismissed, ostensibly to thwart any attempted coup by Fonseka's supporters inside the military.
The defence ministry said an undisclosed number were "sent on compulsory retirement" because they were considered a "direct threat to national security".
The ministry said the officers had breached military discipline by becoming involved in politics.
|Rajapaksa promoted several officers considered loyal to his administration [AFP]
Rajapaksa and Fonseka were close allies in the massive offensive that finally crushed the separatist Liberation Tigers of Tamil Eelam (LTTE) in May, but they fell out after the victory and went head-to-head in the presidential elections.
When he resigned from the military in November and launched his ill-fated bid to unseat the president, Fonseka accused Rajapaksa of falsely suspecting him of planning a coup.
Rajapaksa also carried out a major shake-up of the army over the weekend, transferring 40 officers and promoting several considered loyal to his administration.
Speaking in Colombo on Monday, Fonseka said: "[I am] very surprised to know that I had so many loyal people at the very top and middle level in the army".
He accused Rajapaksa of politicising the military and said his party workers and supporters were still being harassed.
"Even retired army officers who helped me have been taken in [to custody], and no one knows where they are being held," Foneska said.
He said the government had targeted his office to prevent his party from collecting evidence to mount a legal challenge to the election result.
Margin of victory
Rajapaksa won 58 per cent of the vote over Fonseka's 40 per cent, after a contest that many had expected to be much closer.
Rajapaksa called the vote four years into his six-year term to capitalise on popular support for the defeat of the LTTE that ended a decades-long separatist war.
The government insisted the election was free and fair, but the US has pressed for a probe into the charges of vote fraud.
The European Commission too issued a statement calling for an investigation.
Before polling day, the country's independent election commissioner had complained about misuse of state resources for Rajapaksa's re-election campaign and bias in the state media.
KD Knight, chairman of the Commonwealth observer mission, said Fonseka would have to find hard evidence of malpractice to launch any legal challenge to the result.