* Series of Taliban attacks sets country on edge
* Afghanistan to vote on replacement for Hamid Karzai
* Crucial year with election, foreign troop drawdown
By Hamid Shalizi and Maria Golovnina
KABUL, March 29 (Reuters) - With a week to go before Afghanistan's presidential election, escalating violence across the country risks undermining the credibility of a vote meant to mark the first democratic transfer of power in Afghan history.
The Taliban have declared war on the April 5 election, calling it a Western-backed sham and threatening to do everything in their power to derail the vote through a campaign of gun attacks, bombings and assassinations.
A brazen raid by a squad of suicide bombers and gunmen on an election office in Kabul this week sent a chilling message to voters as they prepared to choose a successor to President Hamid Karzai.
"Such attacks may not derail the election, but they will certainly create fear and anxiety among the people," said Nader Nadery, chairman of FEFA, Afghanistan's largest election monitoring group.
"This is the aim of the Taliban and insurgent groups - to discourage people from voting. But the election has to happen on schedule because there is no other option."
Karzai is barred by the constitution from running for another term after 12 years in power, but he is widely expected to retain a hand in politics through officials loyal to him.
A significant rise in violence could complicate the process of counting ballots and create uncertainty over the outcome of the vote, potentially allowing Karzai to stay at the helm for a much longer period than initially expected.
In a move that could further dent confidence in the election, most foreign observers have withdrawn their monitors in the wake of last week's attack on a luxury hotel in which nine people, including one election observer, were killed.
The presence of a full-fledged international monitoring team is key to preventing a repeat of the widespread fraud seen during the previous presidential vote in 2009, when 20 percent of ballots had to be annulled.
Now, only a handful of foreign observers, mainly from the European Union mission, are left in the country, with most confined to their compounds for fear of further violence.
The United Nations estimates that total civilian casualties from the increasingly vicious insurgency rose by 14 percent in 2013, with 2,959 dead and 5,656 injured.
FEAR AND UNCERTAINTY
The prospect of more attacks has jangled nerves in Kabul and beyond, and given rise to wild speculation that the Taliban could mount ever more sophisticated operations such as plane hijackings in the runup to the election.
On Friday, insurgents from the militant group which imposed harsh sharia, or Islamic law, during its reign between 1996 and 2001, forced their way into a guesthouse used by foreigners in the capital.
In another worrying development, the Taliban in Afghanistan and Pakistan have secretly agreed to join forces to carry out attacks in Afghanistan, with Pakistani militants announcing a ceasefire with their government in order to preserve militant bases used to stage cross-border attacks.
"The point is, we know the opponents of the elections are going to try to disrupt them and the Taliban have been very clear about that," said U.S. ambassador James Cunningham.
"And ... there's not going to be any way to completely insulate the entire election structure from violence."
Crucially, many Afghans said they were too afraid to vote in the current environment.
"People are more concerned about their lives and safety than the elections," said Abdul Rahim, a shopkeeper in Kabul. "If something is not worth your life, why risk it?"
Afghanistan's neighbours and the United States will be watching closely how the election unfolds, because it may give an idea of how stable Afghanistan will be in the months to come.
NATO-led forces, which have been reinforcing security since the Taliban were toppled in 2001, are preparing to pull out most troops this year, but Afghan forces who are taking over from them have vowed to hold a safe vote.
In private, officials concede that the violence is likely to deter many voters from casting their ballots and that polling stations are likely to be targeted.
If the turnout is too low the election might be declared invalid altogether, but the risk of that happening is slight. In the troubled 2009 vote, only four million of 13 million eligible voters turned out, but it was still deemed a valid election.
"With such attacks, the Taliban strategy and main objective is to scare away the people from voting. That means lower turnout and the results could be called invalid," said a prominent Afghan politician.
"The election is going to happen by all means but targeting the turnout is very dangerous trend."
(Additional reporting by Jessica Donati; Editing by Mike Collett-White)
Our Standards: The Thomson Reuters Trust Principles.