Anan's campaign team said he had been arrested.
Former military chief of staff Lieutenant General Sami Anan, who had announced his candidacy last week, was taken to the Military Prosecutor’s office in Cairo, according to his son and one of his lawyers, who were waiting outside the building.
An army statement read aloud on state TV said Anan’s presidential bid amounted to “a serious breach of the laws of military service”, because as a military officer he was required to end his service and seek permission before seeking office.
Anan’s spokesman denied he had broken any laws. The charges “come from an inaccurate reading of Anan’s announcement,” Hazem Hosni told Reuters just after the arrest, without elaborating. Nevertheless, the campaign announced Anan was halting his bid.
“To be banned by the state to enter the elections... (means) that the state doesn’t want to hold an election,” Anan’s spokesman Hosni said.
The military declined to comment on Anan’s detention. The interior ministry could not immediately be reached for comment.
Several prominent figures who had been seen as potential challengers to Sisi had already either ruled themselves out or were sentenced to prison even before registrations opened on Saturday.
Sisi was elected president in 2014, a year after leading the military ouster of Islamist president Mohamed Morsi when he was himself commander in chief.
The Egyptian army has accused Anan of announcing his intention to run in the election "without getting the approval of the armed forces or following the required procedures to end his service in the military."
It also said Anan's announcement on Saturday "constitutes direct incitement against the armed forces with the intent of causing a rift between it and the great Egyptian people".
Anan was accused of forging official documents to erroneously suggest that his service in the armed forces had ended.
His candidacy announcement had come just hours after Sisi confirmed he would seek a second term in the March 26-28 election, the third since the 2011 overthrow of strongman Hosni Mubarak.
'Taken to prosecutors'
One of Anan's top campaign aides, Hisham Geneina, told AFP that the presidential hopeful was arrested on Tuesday morning.
His detention came before the armed forces' statement, added Geneina, the former head of the Central Auditing Authority (CAA) who was sacked by Sisi in 2016 after he was accused of exaggerating the cost of corruption.
Mustafa Elshall, Anan's campaign manager, also reported the arrest on his Twitter account.
Ali Taha, a lawyer, said he was asked by the campaign to defend Anan, who in his announcement speech said he had already put in place a team of civilians to support his bid, including Geneina.
Anan served as armed forces chief of staff from 2005 until he was retired by Morsi in 2012.
When the longtime strongman was forced to step down by the Arab Spring protests of 2011, he ceded power to the Supreme Council of Armed Forces (SCAF), an interim executive made up of 20 generals in which Anan served as number two.
Anan's spokesman Hazem Hosni, a political science professor at Cairo University, said he had been meeting with the presidential hopeful and Geneina for months to discuss the country's situation and potential solutions.
"He sees that the state must have space for civil freedoms, political participation, and that killing politics this way in Egypt is not right," Hosni told AFP on Tuesday before the armed forces' video was posted.
Would-be candidates for the presidency must register with the National Elections Authority by January 29, but some have already stepped aside.
Former prime minister Ahmed Shafiq said on January 7 that he would not stand, reversing a pledge he made from the United Arab Emirates in November.
Shafiq had disappeared for 24 hours after being deported to Egypt last month following years in exile in the UAE.
Last week, Mohamed Anwar Sadat, a dissident and nephew of the late president of the same name, said he too would not run because the climate was not right for free elections.
Other potential candidates include Khaled Ali, a rights lawyer and 2012 presidential candidate, and military Colonel Ahmed Konsowa.
However, a military court in December sentenced Konsowa to six years in jail after he announced his intention to stand.
Ali meanwhile has appealed a three-month sentence in September on charges of offending public decency, in relation to a photograph that Ali says was fabricated and that appeared to show him making an obscene gesture outside a court house.