KABUL, Afghanistan (CNN) -- Police in northeast Afghanistan prevented two bomb attacks Thursday, as the country held presidential and provincial elections, authorities said.
Afghans in Kabul queuing to cast their vote in the country's pivotal elections.
But 26 people were killed in election day violence, officials said.
Afghan security officials said 17 Afghan policemen and soldiers, and another nine civilians died.
An American service member was killed in a mortar strike in eastern Afghanistan, the U.S. military said. It did not say where the attack took place.
Major fighting continued for a second day in the city of Baghlan, north of Kabul, and there were reports of rocket attacks in the eastern city of Gardez and the southern city of Kandahar.
Police early Thursday arrested two Taliban members who had planted a roadside bomb in the Farkhar district of Takhar province, said Zia Mahmudi, the chief police commander in Takhar.
In a separate incident, police found explosives planted on a bridge near the city of Takhar, Mahmudi said. The explosives were removed.
The Taliban had threatened to derail the presidential and provincial council elections with violence.
The government tried to ban media coverage of election day violence in an effort to "ensure the wide participation of the Afghan people" at the polls, but the order was largely ignored. Watch preparations on election eve »
Along with police, about 300,000 Afghan and NATO troops were patrolling parts of the country to help safeguard voters Thursday, according to NATO officials in charge of election security.
Earlier this week, there were several high-profile suicide bombings and attacks by the Taliban in Afghanistan.
Two days before the elections, violence in the capital, Kabul, included a rocket attack that damaged the presidential palace compound.
In a separate attack, suicide bombers targeted a coalition military convoy on Jalalabad Road, a major thoroughfare in Kabul. The blast killed seven civilians and wounded 53 others, a defense ministry spokesman told CNN.
All About Afghanistan