The key national security question in this election is whether to preserve or roll back the Bush administration's post-9/11 legislation.
- The Patriot Act, which gave US law enforcement agencies greater powers to intercept communications and investigate suspected terrorists on American soil
- The creation of the Guantanamo Bay prison camp in Cuba, where detainees may be held for years without charge or trial
- President George W Bush's authorisation of the use of "coercive interrogation techniques" on terrorist suspects
- The president's authorisation of the National Security Agency to wiretap US citizens' telephone calls without a warrant, in certain circumstances
Voters have to decide whether the measures are effective, and whether the restrictions they place on personal freedom are justified.
Most Americans' overriding concern is that the authorities protect the country from further terrorist attacks, but some also worry that civil liberties are being violated.
With his military background, the Republican candidate, John McCain, is likely to focus heavily on the national security issue.
But unlike many other Republicans, who strongly supported President Bush's anti-terrorism policies including his authorisation of coercive interrogation methods, Mr McCain - who was tortured in Vietnam - has been a vocal opponent of such methods, and led congressional efforts to outlaw them.
He was supported by many Democrats, including presidential hopefuls Hillary Clinton and Barack Obama.
The Democrats have expressed concern about the potential infringements of civil liberties that they say have been a feature of Mr Bush's national security policy.
They would undertake to roll back some of the post-9/11 anti-terror legislation, by reinforcing the congressional ban on torture, reforming the system of tribunals for terror suspects and strengthening safeguards against warrantless wiretapping by US authorities.
The two parties disagree about the effect of the war in Iraq on national security.
Republicans - including Mr McCain - argue that the war in Iraq has made America safer and would agree with Mr Bush when he said: "We either deal with terrorism and this extremism abroad, or we deal with it when it comes to us."
The Democrats take the view that the war in Iraq distracted the US from the fight against al-Qaeda and created many more enemies abroad, thus making Americans less safe.