The Afghan election will see the biggest security operation mounted in Afghanistan since the fall of the Taliban in 2001.
Around 400,000 Afghan and international troops will be available, although the 55,000 troops of the Isaf force still in Afghanistan will play only a minor role.
Specially trained women weapons screeners will be paid $100 (£60) for the day to enable women to vote. The government has rejected a claim by the Taliban that they have a full list of the screeners.
Polls for the national president and provincial councils in the 34 provinces will be held at the same time; 10% of polling centres have been closed because of security concerns.
The government has to balance security against access. If too many polls are open, then there could be some in areas that are too insecure, allowing for fraud to occur in "ghost stations". But if too many are closed because of security concerns, people will complain that they have not been allowed to vote.
Afghan security forces have been engaged in exhaustive rehearsals to provide three rings of security around every polling centre, with the police in the inner ring, and the army securing the outer defences up to 5km (three miles) away.
The BBC was given exclusive access to an election security briefing at the headquarters of 203 Corps of the Afghan army. Known as Thunder Corps, it controls the most dangerous part of the Pakistan border, and the gateway to Kabul from the south.
Listening to the briefing, the commander of Isaf forces, General Joseph Anderson, said that the rehearsals had been very effective.
"I think the Taliban and others will do everything they could to either intimidate people from going or effect change at the polling centres to make sure they disrupt the process," he noted.
Social media, he said, will play a big role in building confidence on election day. Everybody has a mobile phone; 3G is spreading across the country, and there are believed to be 2.5 million internet users in Afghanistan - ten times as many as at the time of the last election in 2009.
The briefing heard an intelligence assessment that since Kabul is under such tight security, the Taliban are looking instead at targets outside, in particular in Logar, directly south of the capital.
Gen Anderson said: "Logar is where the largest threat is coming for a high-profile attack."
The commander of Thunder Corps, Major-General Mohammed Sharif Yaftali, said his forces were trained to watch out for attempts to rig the poll, as well as violence.
"We will be successful in this. All of the security forces are neutral. As well as security, we will also be observing the election. And we will not allow fraud in our area."
Senior Western diplomats in Kabul are increasingly confident that anti-fraud measures will prevent the widespread ballot-rigging that is believed to have happened in previous Afghan elections.
The UN's head of political affairs in Afghanistan, Nicholas "Fink" Haysom, said there had been "significant improvements" in the system.
The easy availability of voter cards is one place where fraud could occur. The movement of population caused by the conflict has meant that some Afghans have applied for several cards. Some 20m cards have been issued over the years, but while there is no reliable estimate of the number of Afghan adults - it is believed to be around 12 million.
That could mean that there are around 8 million surplus voting cards. It is a peculiarity of the Afghan system that voters are not registered for a particular polling centre. Anybody can vote anywhere. But the use of indelible blue ink should make it impossible to vote twice.
Counting the votes
Voting cards have been on sale to candidates. But international observers believe that the main fraud last time did not happen because of fake cards. Instead ballot papers were filled in without cards and stuffed into ballot boxes.
This time a barcode system for each ballot is designed to prevent fraud. And one copy of each count will be posted outside each polling centre, while another is sent to Kabul, so that local people should be able to monitor irregularities.
And through social media these unofficial results will be announced by people working for the candidates ahead of an official count next week.
Another check on fraud will be networks of observers. There are expected to be around 200,000 people watching the process - working for independent monitors and for the candidates.
The best check against fraud has been the quality of the political campaign itself. Mr Haysom said there had been "considerably greater interest in the campaigns, in people's positions, in the political debates, than we have probably ever seen in Afghanistan before". Election rallies have been well attended, not only with people who came for the prospect of a free lunch. I have spoken to several people who have come to rallies to see the candidates and make up their mind.
Afghans have high hopes about the ability of this election to deliver change, which will give the incoming leader a major challenge to manage expectations.