The former Egyptian chief-of-staff, who recently announced his bid to run for presidential elections, is being held at a military prison, according to his lawyer.
Lawyer Nasser Amin said on Saturday that he was able to visit General Sami Anan, who was arrested last week.
The executive director for Anan's election campaign, Ahmed Abed Rabbo, told Al Jazeera the arrest and detention of Anan was politically motivated and that Egyptian President Abdel Fattah el-Sisi was obstructing any chance for genuine presidential elections.
The army arrested Anan on January 23, three days after he announced he would contest Sisi in the upcoming elections.
It accused Anan of committing violations that "warrant official investigation", according to the Supreme Committee of the Armed Forces (SCAF).
The army said the 69-year-old had not obtained the army's approval to run for president and accused him of seeking to divide the armed forces and citizens of Egypt.
On Saturday, a member of Anan's campaign, Hisham Genena, was attacked and severely wounded outside his home in the suburbs of the Egyptian capital, Cairo.
Pressure to drop out
The election is set to take place on March 26-28. Presidential hopefuls have until January 29 to collect enough signatures to officially submit their candidacies.
A runoff vote will be held in April if no candidate receives more than 50 percent support in the first round.
To be eligible to run for president, a candidate must collect 25,000 signatures from constituents across 15 governorates (with at least 1,000 signatures from each area), or the signatures of 20 members of parliament.
Sisi announced on January 20 he would run for a second, four-year term.
The president made the expected announcement during a televised conference where he stressed the importance of citizens voting to "preserve the democratic experience that began four years ago".
But in the weeks leading up to the 2018 elections, multiple media reports have suggested that would-be opposition candidates were under pressure to drop out of the race.
Khaled Ali, a human rights lawyer and opposition leader announced he was withdrawing his campaign on January 24. Ali received a three-month prison sentence for "offending public decency" after he allegedly made an obscene gesture during a protest. The issue was widely believed to hamper his ability to formally present his candidacy this year.
The New York Times quoted one of Shafik's lawyers, who asked not to be named, as saying that the Egyptian government had forced him to withdraw by threatening to investigate previous charges of corruption against him.
In December 2017, Ahmed Konsowa, an army colonel, was sentenced to six years in prison after announcing his plans to run in a video released online. Konsowa was accused of "stating political opinions contrary to the requirements of military order", his lawyer, Asad Haykal, was quoted as saying by AFP news agency.