The last main challenger dropped out of Egypt’s presidential election on Wednesday, effectively clearing the field for President Abdel Fattah el-Sisi to run virtually unopposed in a vote that is shaping up to be a referendum on his military-backed rule.

The challenger, the human rights lawyer Khaled Ali, said a fair contest was no longer possible after a concerted government effort to derail his campaign by arresting his supporters and frustrating his efforts to register as a candidate.

“It was difficult and, frankly, bitter,” Mr. Ali told reporters in Cairo of his decision to exit the race.

Mr. Ali quit one day after Sami Anan, a former army chief who had declared his candidacy, was arrested by the military on charges of forgery and “incitement.” On Wednesday Mr. Anan’s son, Samir, said the family had no news of his whereabouts.