More than 100,000 Afghan and foreign security forces were on high alert Friday, the day before the country's first direct presidential election after more than two decades of war.

Despite a 24-hour flurry of rocket attacks, fears that Taliban (search) or Al Qaeda fighters would launch a massive assault to disrupt Saturday's polls have not materialized so far. It was welcome news in a country that faces an enormous task in pulling off its first democratic vote.

"Everyone is optimistic that the election will carry forth," said Lt. Commander Ken MacKillop, a spokesman for international peacekeepers. "We have been working very closely with the Afghan police and army to make sure the security environment in Kabul and throughout the country is as safe as possible."

However, a mix-up between two groups of Afghan forces — each side thought the other were rebels — sparked an hour-long gunbattle that left four soldiers dead and four wounded, a senior official said Friday.

The clash between army troops, who were delivering election material, and militiamen loyal to the government occurred Thursday in a Taliban stronghold in southern Helmand province (search), Gov. Sher Mohammed Akhundzada told The Associated Press.

The troops called in assistance from the U.S. military, but the mistake was realized before American warplanes could intervene.

Also in the south, just outside the city of Kandahar (search), a bomb sniffing dog at a checkpoint Friday detected explosives packed into a fuel tanker, U.S. Army Maj. David Flynn said. The truck was seized and three Pakistanis in the vehicle were arrested, Afghan officials said.

It was not immediately clear how the bomb-laden truck was to be used.

Early Friday, a rocket slammed into a parking lot near the U.S. Embassy in Kabul, causing no damage or casualties.

It was the first attack in the city since August 28, when a huge car bomb outside a private U.S. security firm killed 10 people — three of them Americans.

Meanwhile, two rockets exploded in the eastern city of Jalalabad on Friday. One hit a house, wounding a young girl and an old man, said Faizan Ul-Haq, a spokesman for the provincial government.

Eight rockets were also fired at the southeastern city of Qalat late Thursday, but missed, flying over the city and landing on empty land, police said.

Security has been a top concern in the lead-up to the election. There have been three attacks on interim leader Hamid Karzai and his political allies, limiting his ability to campaign.

The 9,000-strong NATO-led International Security Assistance Force (search) said it was on high alert ahead of the vote.

In Kandahar, police were checking for mines at polling stations, while election officials made sure their staff knew their roles — handing out ballots, ushering people behind screens to vote, and dipping their thumbs in indelible ink to ensure they don't cast their ballots twice.

One organizer said he had been so focussed on the polls, his nightly dreams were full of them.

"I am not worried about Taliban attacks. In some of my dreams everything goes well, but in others all my staff just ignore what I have told them," Rahmatullah Khan said.

Afghanistan's Interior Minister Ali Ahmad Jalali said more than 100,000 Afghan soldiers and police, regional militias allied to the government, U.S. troops and international peacekeepers had deployed to protect the vote.

He said security forces had thwarted at least 20 attacks and arrested more than 100 people since the start of the campaign on Sept. 7, but that the rebels had managed more than 60 rocket or bomb attacks during the period.

He put the death toll at more than 60 — including 15 civilians, 19 security forces and 30 suspected rebels. Six Afghan troops were taken hostage.

Human rights group Amnesty International said Friday that the violence indicated a "climate of fear and insecurity" gripping Afghanistan.

"Lawlessness is rife: most Afghans have no access to justice because the judiciary is largely ignorant of national law. Armed groups in effect rule most of the country," it said in a statement.