Obama Romney
October's US payroll data will give President Obama a lift ahead of the election on 6 November (Reuters) Reuters

The US economy added 171,000 new jobs in October, beating forecasts and giving President Obama the edge over challenger Mitt Romney in the last set of major data to be released ahead of the presidential election.

Unemployment crept up slightly to 7.9 percent, reported the US Bureau of Labor Statistics, which also said that Hurricane Sandy "had no discernible effect" on October's data.

"Both the unemployment rate and the number of unemployed persons (12.3m) were essentially unchanged in October, following declines in September," the department said.

Romney used the data to attack Obama.

"Today's increase in the unemployment rate is a sad reminder that the economy is at a virtual standstill," said Romney in reaction to the figures.

"The jobless rate is higher than it was when President Obama took office, and there are still 23m Americans struggling for work."

However the White House said in a statement that the data is a sign that the economy is recovering.

"While more work remains to be done, today's employment report provides further evidence that the US economy is continuing to heal from the wounds inflicted by the worst downturn since the Great Depression," said the statement.

"It is critical that we continue the policies that are building an economy that works for the middle class as we dig our way out of the deep hole that was caused by the severe recession that began in December 2007."

Employment and the economy are at the forefront of voters' minds in the run-up to the presidential elections on 6 November.

Latest polls have the two candidates neck and neck.

September payroll figures showed that unemployment sank to 7.8 percent, its lowest rate since August 2009, a boost for Obama ahead of the three televised debates between him and his Republican rival. In that month US firms added 114,000 jobs.

However Romney has tried to use Obama's economic record as a stick with which to beat him during the campaign.

Since Obama took power in 2008, the US economy has been through a deep recession, triggered by the financial crisis, and is experiencing its slowest recovery since the Second World War.

There is also a huge budget deficit in government finances, totalling $1tn (£621bn).

"Like much of the eastern seaboard, the president's election prospects are battered - but have the wind firmly in their sails once again," said Marcus Bullus, trading director at MB Capital.

"Two straight months of strong employment numbers suggest that the US economy is coming good at just the right time for Obama.

"The polls are too close to call, but the latest employment numbers may just save one more job - the president's."