Egypt's last main opposition candidate in an upcoming presidential election announced he was halting his campaign and withdrawing from the race on Wednesday, saying conditions did not allow for a fair contest.

After rights lawyer Khaled Ali's withdrawal on Wednesday and the arrest of the only serious challenger, former military chief of staff Sami Anan the day before, the March 26-28 vote now faces the prospect of featuring only one candidate.

Ali announced he was withdrawing from the race, saying his supporters were being intimidated and the electoral process was corrupt. The announcement came a day after the arrest of former military chief of staff and would-be challenger Sami Anan.

"People's confidence in the possibility of transforming electoral gains into a chance for a new beginning, has unfortunately, in our view, for now ended," Ali said at a news conference in central Cairo. "We announce our decision not to enter this race."

Candidates challenging el-Sisi have described sweeping efforts to kill off their campaigns before they begin, with media attacks, intimidation of supporters, and a nomination process stacked in favour of el-Sisi, himself a former general.

The 45-year-old Ali rose to national prominence last year when he won a case that nullified an unpopular government transfer of two Red Sea islands to Saudi Arabia, a deal that had prompted rare mass protests.

Ali was the first person to announce, last November, that he would run against el-Sisi, who led the ouster of former president Mohamed Morsi of the Muslim Brotherhood over four years ago.

Egyptian President Abdel Fattah el-Sisi, seen last week, is facing no serious opposition for the March 26 election. Critics claim opponents have been subjected to a campaign of intimidation. (Egyptian President via Reuters)

Ahmed Shafiq, who finished second to Morsi in the 2012 election earlier announced his decision to not contest the election, as did Egyptian legislator Mohamed Anwar al-Sadat, a nephew of Anwar Sadat, the Egyptian president assassinated in 1981.

The electoral commission has said it will ensure the vote is fair and transparent. Egypt's president's office and government press centre have not commented on the election race.

'Brazen attack'

Other candidates have until Jan. 29 to register before a final list is announced on Feb. 20. A small crop of lesser-known challengers have announced their intention to run but it is far from certain they will garner the necessary nominations required under Egyptian law to actually run.

Supporters say el-Sisi has brought more security since 2013, although the country faces a stubborn Islamic State in Iraq and Syria (ISIS) insurgency in the North Sinai region. Critics say his popularity has been damaged by austerity reforms and a crackdown on dissidents.

The army accused Lt.-Gen. Anan of breaking the law by running for office without permission and his campaign was halted in its tracks.

Sami Anan, seen in a 2011 file photo, was arrested after a lengthy raid on Tuesday, his son said. (Khaled Desouki/Reuters)

Anan's son, Samir, said police had raided the family home late on Tuesday. "They took everything they found in his office ... they stayed until about 1 a.m.," he said.

The United Nations said it was concerned about reports of Anan's arrest.

"We urge the authorities in Egypt to ensure that the election campaign is conducted in a credible, inclusive, peaceful and participatory manner," UN spokesman Stephane Dujarric told reporters in New York.

Amnesty International said on Wednesday this was a "brazen attack" on freedom of expression and political participation."

Anan is among a growing number of candidates arrested or convicted on trumped up charges by the Egyptian authorities," the London-based rights group said in a statement.

Egypt was "hell-bent" on arresting and harassing anyone who stood against Sisi, Amnesty said.

When he announced last week he intended to run again, el-Sisi listed Egypt's achievements in his first term and said: "Building the state takes 16 to 20 years, I am trying to finish it in eight years, God willing."

El-Sisi has vowed to crush Islamist militants and revive a battered economy.

Tough fiscal reforms introduced over the past year, in line with a $12 billion International Monetary Fund loan, hit Egyptians hard but has attracted new foreign investors and economists expect growth to pick up.