Egyptian military prosecutors ordered a colonel be detained for 15 days after he announced plans to run in the country's 2018 presidential election, his lawyer said on Sunday.
Colonel Ahmed Konsowa was detained on Saturday on suspicion of "behaviour that harms the requirements of the military" because he "published a video and stated political views," said the lawyer, Asaad Heikal.
The 42-year-old colonel was detained for 15 days in preventive custody as the prosecution investigates the case, Heikal told AFP.
Konsowa announced his plans to stand in the election in video messages and a statement posted on his Facebook page on Wednesday.
"I proudly declare that I have decided to unlock the current political deadlock by running" in the election, Konsowa said in the statement.
Without mentioning Egyptian President Abdel Fattah al-Sisi's name, Konsowa criticised in the videos the country's policies in education, health, and the economy.
Egypt "cannot wait anymore to join the developed world and to abide by human rights standards and global values of citizenship and transparency, as well as the rule of law," he said in the statement.
Konsowa's lawyer said the colonel was "still in the armed forces and he affirms that he values his service and he is not a rebel."
The colonel "announced his candidacy in the example of President Sisi, who declared his candidacy wearing his uniform and then resigned" as defence minister, said Heikal.
Konsowa, he added, had in fact declared his intent to run for office following the example of Sisi: himself a former army chief.
Sisi was elected president in 2014, a year after leading the military ouster of former Islamist president Mohamed Morsi, amid mass protests against his one-year rule.
Sisi is certain to run in next year's election, although he has yet to formally announce his candidacy.
Konsowa said he had been trying to resign from the military in lawsuits for more than three years, submitting his first resignation in March 2014.
Since then, he said, he had been "struggling in a very disappointing legal battle to get my political-participation constitutional right to run for various elections."
"Consequently this time I have decided to put the whole thing in front of the people through this simple announcement," he said.
Former premier and military general Ahmed Shafiq was reportedly deported from the United Arab Emirates to Egypt, also on Saturday, after announcing he would run in the election.
Shafiq's lawyer and a relative said his whereabouts have not been known since he reportedly landed back in Cairo on Saturday evening.