Syria United Nations
UN-Arab League envoy for Syria Lakhdar Brahimi pauses during a news conference at the United Nations European headquarters in Geneva. Reuters

The top UN mediator in the Syrian civil war, Lakhdar Brahimi, has resigned weeks after Syrian president Bashar al-Assad announced plans to hold a general election in June.

UN-Arab League envoy for Syria, Brahimi, held a joint press conference with the UN secretary-general Ban Ki-moon to announce that Brahimi's resignation would take effect from 31 May.

"I have decided to accept the request of Lakhdar Brahimi to relinquish his duties," Ban said.

"Mr Brahimi has long been recognised as one of the world's most brilliant diplomats. The resignation, he added, was "a failure for all of us".

Ban has requested more time to find a successor as the demands of the civil war continue to take its toll on the organisation.

Brahimi, who is from Algeria, has organised two sessions of negotiations, hosted in Geneva, between Assad's regime and opposition members but no breakthrough was made.

Brahimi took on the job, one of the toughest in the diplomatic world, in 2012 after his predecessor and former UN secretary-general Kofi Annan failed to find a resolution.

Brahimi said at the time that the role would be "an extremely complicated and very, very difficult mission".

Assad's forces this week took control of the "capital of the revolution", the city of Homs. Assad is expected to win another seven-year term in the June election which has been denounced as a "farce" by opposition leaders.

Approximately 150,000 people have died in the civil war and more than three million people denied vital medical aid.