COLOMBO (AFP) - Sri Lankas president on Monday sacked a dozen senior military officers whom the defence ministry said were a direct threat to national security after last weeks presidential elections. A military official said it was the armys biggest-ever purge and went beyond a 1962 shake up following a coup attempt by volunteer officers against late prime minister Sirima Bandaranaike. What we have just witnessed is the biggest single shake up in the army, a top official who declined to be named said. The sacking is also coupled with several drastic changes in key positions. President Mahinda Rajapakse had accused the defeated opposition of planning to assassinate him after he beat former army general Sarath Fonseka in the bitterly fought January 26 poll. Security forces kept Fonseka under siege while election results were announced on Wednesday, and 15 retired officers working at Fonsekas offices were later arrested. The military official told AFP 12 top officers, including three major generals, were sacked to thwart any attempted coup by Fonsekas supporters inside the military. The defence ministry in a statement 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. Rajapakse and Fonseka were close allies in the massive offensive that finally crushed the separatist Tamil Tigers 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 Rajapakse of falsely suspecting him of planning a coup. Rajapakse also carried out a major shake-up of the army over the weekend, transferring 40 officers and promoting several considered loyal to his administration. Fonseka told reporters in Colombo on Monday that he was very surprised to know that I had so many loyal people at the very top and middle level in the army. He accused Rajapakse 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, he said. Fonseka said the government had targeted his office to prevent his party from collecting evidence to mount a legal challenge to the election result. Rajapakse won 58 percent of the vote, trouncing Fonseka, who got 40 percent, after a contest that many had expected to be much closer. Rajapakse called the vote four years into his six-year term to capitalise on popular support for the defeat of Tamil rebels that ended a decades-long separatist war. The government insisted the election was free and fair but the United States 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 countrys independent election commissioner had complained about misuse of state resources for the presidents re-election campaign and bias in the state media. K.D. 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.