A former Afghan fighter turned mediator says Saudi Arabia and the United Arab Emirates (UAE) tried to host the Taliban before the armed group set up an office in Qatar.

Abdulla Anas, a former friend of the late al-Qaeda chief Osama bin Laden, told the Middle East Eye on Friday that he was "bewildered" by Saudi Arabia's claim that Qatar supported "terrorism" by allowing the Taliban to open an office in Doha.

That initiative was first established in Saudi Arabia, Anas said.

"There were also some rounds in the Emirates. So if Qatar is accused of hosting terrorists, someone hosted the same 'terrorists' before this," he said.

READ MORE: Otaiba emails - UAE lobbied US to host Taliban office

His statements apparently contradict a mounted campaign against Qatar for its alleged support of "terrorist groups".

A Saudi-led bloc, which includes UAE, Bahrain and Egypt, severed diplomatic ties with Qatar in June and imposed a land and sea blockade.

The four Arab states accused Qatar of financing "terrorism", citing the 2013 opening of a Taliban embassy in Doha as an example.

Qatar has denied all allegations and said it agreed to open the mission for the Taliban as part of a broader US-led effort to facilitate peace talks in Afghanistan - not to support their ideology or the group itself.

READ MORE: Qatar-Gulf crisis - All the latest updates

Anas, an Algerian who now lives in London, told Middle East Eye that he made a series of visits to Saudi Arabia between 2006 and 2008 in an effort to bring warring factions in Afghanistan to the negotiating table.

He said he met Prince Muqrin bin Abdulaziz Al Saud, the former head of Saudi intelligence, more than once, and helped organise the 2008 peace talks in Medina with the blessings of the late king, Abdullah bin Abdulaziz Al Saud.

Hashmat Moslih, an Al Jazeera journalist who covers Afghanistan, says the Taliban ultimately turned to Qatar because Saudi Arabia was seen as a party to the war in Afghanistan.

"The Taliban had to choose a country that was neutral. And Qatar was a neutral country," he said, adding: "Although Saudi Arabia wanted to host the Taliban, the Afghan government would have objected because of the Saudis' close ties with the Taliban."

A series of leaked emails have recently shown that UAE diplomats also lobbied US officials so Abu Dhabi could host the Taliban office.

The New York Times reported in July that Yousef al-Otaiba, UAE ambassador to the US, received an "angry call" from Abdullah bin Zayed Al Nahyan, UAE's foreign minister, complaining that the Taliban had ended up in Qatar and not the UAE, according to messages in Otaiba's webmail account.

In 2011, when the emails were sent, the Obama administration was making efforts to hold peace talks between the Taliban and the Afghan government as it sought to remove NATO troops from the country.

Most of the troops withdrew in 2014, but peace was not achieved.

The opening of the office angered Hamid Karzai, then president of Afghanistan, by styling itself as an unofficial embassy for a government-in-exile.

The office has since been closed.

Otaiba has repeatedly criticised Qatar for its alleged alliance with the Muslim Brotherhood and over the opening of another Doha-based office for the Palestinian group Hamas, which was also arranged with US approval.