Two major foreign election observer and support missions have pulled staff out of Afghanistan after a Taliban attack on a Kabul hotel, observers said on Sunday, in a move which could undermine confidence in the outcome of the crucial vote.

The April 5 vote is less than two weeks away and could mark the country's first democratic transfer of power. Many fear a repeat of the widespread fraud that discredited the poll in 2009 when about 20 percent of votes were thrown out.

"It's really bad news," said Jandad Spingar, director at the Free and Fair Election Foundation of Afghanistan, the largest Afghan monitoring group.

"Having international observers in the election is really, really important... (to) give legitimacy to the process."

The National Democratic Institute (NDI) said it had pulled its observers from the country, while a senior European diplomat said observers from the Organisation for Security and Co-operation in Europe (OSCE) had been pulled out to Turkey.

The European Union's international monitoring mission will be the only major one to remain in Afghanistan after the Taliban on Thursday attacked the heavily fortified Serena Hotel in central Kabul, where most foreign observers were staying.

"We have withdrawn our staff that were staying at the Serena, and we are assessing our election monitoring activities," said Kathy Gest, public affairs director at NDI.

NDI observer Luis Maria Duarte was among the nine people killed and many of his colleagues were in the building when four gunmen with pistols sprayed diners at the hotel's restaurant with bullets.

Officially, the OSCE said it had yet to make a final call on whether it would cancel its international election support mission, despite sources saying foreign staff had already left for Turkey.

"Our security experts are currently assessing the security situation in Kabul for our team, who were at the Serena the night of the attack," spokesman Thomas Rymer said.

While violence and insecurity across Afghanistan was always going to confine foreign observers mostly to compounds in major cities, their presence and expertise was to serve as a vital form of reassurance to their Afghan colleagues.

The Serena Hotel had been attacked before, but has since been increasingly fortified and considered safe enough to accommodate foreign observers during the election.

It was also one of few places foreign officials were still permitted to go after the Taliban attacked a popular Lebanese restaurant killing 21 people in January.

The EU said its overall plans for its international monitoring mission had not changed. However, several of its staff were flown out of the country after the attack, according to an observer on the same flight.

"We are safe at the EU compound and for us there is no reason to change anything in our plans," said chief EU observer Thijs Bernam.

President Hamid Karzai is barred from a third term, but his brothers are publicly backing former foreign minister Zalmai Rassoul.

Critics say the campaign reflects a desire by Karzai and his family to remain in power, but the president says he will remain impartial and is looking forward to retirement.