Media playback is unsupported on your device Media caption Do ordinary Americans feel their economy is on the road to recovery?

The US economy added 171,000 new jobs in October, which was much more than had been expected.

But the official figures from the Labor Department showed that the unemployment rate still rose to 7.9%, having fallen to 7.8% in September, as more workers resumed the search for jobs.

Only people who are currently looking for a job count as unemployed.

Unemployment is one of the key issues ahead of Tuesday's presidential election.

The figures were the last major set of economic data scheduled before the election and the Republican candidate, Mitt Romney, has made the state of the jobs market one of the central planks of his campaign.

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

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

The number of jobs created in the previous two months was revised upwards, with an extra 34,000 jobs added in September and 50,000 added in August.

Analysis For President Obama, there is good and bad news in these latest jobs figures. He can breathe a sigh of relief that, when Americans vote next week, there are more of them with jobs than when he took office. His challenger Mitt Romney can no longer accuse him of presiding over a net loss of jobs. However, the unemployment rate rose and is now higher than it was when Mr Obama took over at the White House. Setting out the key figures still leaves another vital political question: who is at fault for the state of the US labour market? Was it due to a recession already in full swing when he took over or did his policies aggravate the situation? Why the US jobs figures matter

"We've made real progress," Barack Obama told a crowd in Ohio.

"But we've got more work to do."

Analysts said both candidates could take something from the figures.

"President Obama can point to faster job creation, while Governor Romney can say that the unemployment rate is higher now than in January 2009 when the president took office," said Nigel Gault, chief US economist at IHS Global Insight.

"On balance, the report is better than expected, which should help the incumbent, but not sufficiently so to be a game-changer."

Despite the new jobs, Barack Obama will still go to the polls with the highest rate of unemployment of any president seeking re-election since Franklin D Roosevelt.

The unemployment rate edged up slightly because the number of people looking for jobs increased. These were people who had previously given up hope of finding work, but who now think they may have a better chance. As a result, this increase may be seen as a sign of confidence in the economy, analysts say.

The total workforce, which is the number of people either working or looking for jobs, rose 578,000 in October.

Improved direction

The Labor Department said in its release that Hurricane Sandy, which hit the East Coast of the US on 29 October, had had "no discernible effect" on the employment data.

The number of involuntary part-time workers, who would prefer to be working full-time, fell 269,000 to 8.3 million, having risen by 582,000 in September.

Kathy Jones from Charles Schwab said they were good numbers, but warned that: "We're way short of where we need to be to bring down the unemployment rate to where the Federal Reserve would like to see, closer to 6% than 8%."

"We would need to see twice as many jobs as we're seeing, but the direction has improved."

The average number of jobs added per month so far in 2012 has been 157,000, which is slightly ahead of the average of 153,000 in 2011.

Remember that butterfly whose wing-beat in the Amazon causes a storm over the Atlantic? I think she is hovering over the election right now

The category adding the most jobs in October was professional and business services, followed by healthcare and retailing.

There was also a small increase in employment in the construction sector, which has been helped by a pick-up in house building.

The average working week was 34.4 hours for the fourth month in a row, while the average hourly wage was down one cent at $23.58 (£14.69).

Despite there being signs of momentum in the jobs market, there is great concern in the US about what 2013 will bring.

Whoever wins the presidential election will have to reach a budget agreement with legislators by the end of the year, to prevent $600bn of tax increases and spending cuts kicking in automatically in 2013.

The measures, known as the fiscal cliff, could take the US back into recession.

There is also some uncertainty about the coming months as a result of Hurricane Sandy.

Many businesses will have their work interrupted by effects of the storms. On the other hand, reconstruction on the East Coast is likely to increase employment in the construction sector.

In New York, the Dow Jones index opened higher but closed down 139.46 points, or 1.1%, at 13,093.16.