Egypt's military on Tuesday arrested its former chief of staff, who was planning to run in upcoming elections against president Abdel Fattah El Sisi, accusing him of inciting against the armed forces and forgery.
Sami Anan's bid to run is now all but dead. His arrest comes after two other potential candidates dropped out of the race this month, with one, former prime minister Ahmed Shafiq, saying he had realised he was "not the ideal candidate to lead the country's affairs in the coming period" and the other, former MP Mohammed Anwar Sadat, saying he saw no possibility of a fair race against Mr El Sisi.
Mr El Sisi, himself a former head of the military, is considered virtually certain to win re-election in the March 26 to 28 vote.
A security official said Mr Anan was arrested by the military simultaneously with the release to the official media of an armed forces' statement listing the allegations facing him. His arrest was also reported by two top aides.
The statement said the former general would be questioned on charges of forging documents relevant to the formal end of his active service, breaching army regulations by declaring his intention to run without first clearing it with the military and inciting against the armed forces in his comments to the nation when he declared his intention to run for president earlier this month.
"The armed forces could not allow itself to ignore the blatant legal violations committed by the aforementioned which constituted a gross breach of the rules and regulations governing the service of armed forces officers," said the statement.
"In upholding the principle of the law's sovereignty as the basic rule of the state, it is imperative that legal measures pertaining to these violations and crimes be taken and he (Anan) is summoned for questioning by the relevant authorities."
A brief statement by Mr Anan's campaign said it was suspending its activity indefinitely.
"The campaign for the nomination of Sami Annan as president of Egypt regrettably announces the indefinite suspension of the campaign out of fear for the safety and security of all citizens who dream of change," it said on the campaign's official Facebook page.
With Mr Anan out of the race and possibly facing a court martial, only one serious presidential hopeful is left in the field: prominent rights lawyer Khaled Ali. But his candidacy is also at risk. In September, he was convicted of making an obscene hand gesture in public, and if that ruling is upheld on appeal, he will be ineligible to run. The next hearing is scheduled for March 7.
An aide at Mr Ali's campaign, Khaled Abdel-Hameed, said the potential candidate and his campaign leaders would meet later on Tuesday to assess the situation following Mr Anan's arrest. "All options are open, including quitting the race," he said.
Mr Anan, who was chief of staff until 2012, only had an outside chance against Mr El Sisi, but his participation would have lit it up a race whose outcome is virtually a foregone conclusion.
The election is scheduled for March 26 to 28, with run-offs the following month, if needed.
The move by the military did not come as a complete surprise given that the powerful military establishment would have been loath to see two of its graduates slug it out in an election contest, regardless of the overwhelming odds in favour of Mr El Sisi.
Mr Anan has also been the subject of fierce criticism by the pro-Sisi media since he announced his intention to challenge the president. He has been accused of seeking the support of the outlawed Muslim Brotherhood, conspiring with the West against Mr El Sisi and defaming the country's military.
In a video statement announcing his intention to run, Mr Anan appealed to military and state institutions to remain neutral in the presidential race, saying it should not be biased in favour of Mr El Sisi who might not be president in a few months' time.
He also decried the president's policy of involving the military in mega infrastructure projects embarked on since 2014, saying that was to blame for what he called the "erosion" of the state's ability to deal with major domestic and foreign policies, including combating terror and economic woes.