US President Barack Obama and Republican challenger Mitt Romney have battled down to the wire, mounting a last-minute election day drive to get their supporters to the polls in a handful of states that will decide the winner in a neck-and-neck race for the White House.

Capping a long and bitter presidential campaign, Americans cast their votes at polling stations across the country.

At least 120m people were expected to render judgment on whether to give Mr Obama a second term or replace him with Mr Romney.

Their decision will set the country's course for the next four years on spending, taxes, healthcare and foreign policy challenges like the rise of China and Iran's nuclear ambitions.

National opinion polls show Mr Obama and Mr Romney in a virtual dead heat.

The Democratic incumbent has a slight advantage in several vital swing states - most notably Ohio - that could give him the 270 electoral votes needed to win the state-by-state contest.

Mr Romney, the multimillionaire former head of a private equity firm, who is also the former governor of Massachusetts, would be the first Mormon president and one of the wealthiest Americans to assume the nation's highest office.

Mr Obama, the country's first black president, seeks to avoid being relegated to a single term, something that has happened to only one of the previous four occupants of the White House.

Whichever candidate wins, a razor-thin margin might not bode well for the clear mandate needed to help break the partisan gridlock in Washington.

Mr Romney voted at a community centre near his home in a Boston suburb, before dashing off for a pair of last-minute stops, including Ohio, which is considered a must-win. "People in Ohio know that they're probably going to decide who the next president is going to be," he told a radio station in the state.

In an awkward convergence of campaign planes that underscored the importance both sides have pinned on Ohio, Vice President Joe Biden made a surprise landing in Cleveland just minutes after Mr Romney touched down, in what looked like an attempt to steal the Republican's thunder.

Mr Romney stayed on board until the Biden motorcade cleared the tarmac, which soon became even more crowded when his Republican running mate, Paul Ryan, landed to join the Cleveland visit.

Settling into his hometown of Chicago, Mr Obama delivered a final pitch to morning commuters in toss-up states that have been an almost obsessive focus of both campaigns, and made a surprise visit to a local field office staffed with volunteers.

"Four years ago, we had incredible turnout," Mr Obama told a Miami radio station in a pre-recorded interview. "I know people were excited and energized about the prospect of making history, but we have to preserve the gains we've made."

He called a hip-hop music station in Tampa, Florida, in a final outreach to African-American supporters, telling listeners that voting was "central to moving our community forward."

Fuelled by record spending on negative ads, the battle between the two men was focused primarily on the lagging economic recovery and persistently high unemployment, but at times it also turned personal.

As Americans headed to voting booths, campaign teams for both candidates worked the phones feverishly to mobilize supporters to cast their ballots.

Polls will begin to close in Indiana and Kentucky at 6pm EST (11pm Irish time), with voting ending across the country over the following six hours. Ohio closes at 7:30pm (12.30am Irish time).

The first results, by tradition, were tallied in Dixville Notch and Hart's Location, both in New Hampshire, shortly after midnight (5am Irish time).

Mr Obama and Mr Romney each received five votes in Dixville Notch. In Hart's Location, Mr Obama had 23 votes to nine for Mr Romney and two for Libertarian candidate Gary Johnson.

The close race raises the prospect of a disputed outcome similar to the 2000 election, which ended with a US Supreme Court decision favouring George W Bush over Al Gore after legal challenges to the close vote in Florida.

Both the Mr Romney and Mr Obama campaigns have assembled legal teams to deal with possible voting problems, challenges or recounts.

Sporadic complaints about voting procedures have surfaced from Pennsylvania to Florida, while long lines in many states posed their own challenges.

It was unclear what impact controversies over everything from the presence of poll watchers to software installation on tabulation machines would eventually have on a close election.

Watchdog groups said there was confusion over voter ID requirements in Pennsylvania, a state Mr Obama had been expected to win, but that Mr Romney visited in recent days as he sought to expand the battleground.

Frustrations have also been running high in storm-battered New York and New Jersey.

However there was no immediate claim of anything widespread or systematic enough to cast doubt on the credibility of the election outcome.

House and Congress votes taking place

The balance of power in the US Congress also will be at stake in races for the Senate and House of Representatives that could affect the outcome of "fiscal-cliff" negotiations on spending cuts and tax increases, which kick in at the end of the year unless a deal is reached.

Obama's Democrats are now expected to narrowly hold their Senate majority, while Romney's Republicans are favoured to retain House control.

Despite uncertainty about the outcome of the presidential election, US stocks climbed on speculation that it would produce a clear winner.

World stock exchanges also rose, but the election kept trading subdued. "It's a relief that hopefully the election will be over," said Fred Dickson, chief market strategist at D.A. Davidson & Co. in Lake Oswego, Oregon.

Despite the weak economy, Mr Obama appeared in September to be cruising to a relatively easy win after a strong party convention and a series of stumbles by Mr Romney, including a secretly recorded video showing the Republican writing off 47% of the electorate as government-dependent victims.

However Romney rebounded in the first presidential debate on 3 October in Denver, where his sure-footed criticism of the president and Mr Obama's listless response started a slow rise for Mr Romney in polls.

Mr Obama delivered much stronger performances in two subsequent debates and has been praised in recent days for taking the lead in federal relief efforts for victims of superstorm Sandy in the New York-New Jersey area.

The presidential contest is now likely to be determined by voter turnout, and weather could be a factor. Much of the nation was dry and mild, though rain was forecast later on Tuesday in the southeast, including Florida, an important swing state.

In the closing act of the 2012 election drama, both men expressed confidence in winning. However Mr Obama hedged slightly, saying, after the Chicago campaign office visit, that "it's going to depend ultimately on whether those votes turn out."