The spectacle of the President and his immediate predecessor lashing out at each other came two days before the midterm election, and 10 years to the day after Mr Obama won the White House in 2008.

In Macon, Georgia, Mr Trump declared that Mr Obama "did not tell the truth" when he told Americans "You can keep your doctor, you can keep your plan" under his signature healthcare legislation.

accusing the President and Republicans of "just making stuff up" and mocking them for claiming ownership of economic gains that began on his watch.

"The economy created more jobs in my last 21 months than it has in the 21 months since I left office," Mr Obama said in Gary, Indiana. "So, when you hear these Republicans bragging about, 'Look how good the economy is,' where do you think that started? Somebody had to clean it up. That's what a progressive agenda did."

The presidential broadsides came as Mr Trump and his allies defended the President's focus on immigration, the Georgia gubernatorial race was rocked by last-minute accusations of hacking and leaders of both parties voiced cautious optimism about their chances on Tuesday.

A Washington Post-ABC News poll released on Sunday showed that 50 per cent of registered voters prefer Democratic House candidates, compared with 43 per cent for Republicans. Democrats need to gain 23 seats to retake the House and two seats to reclaim a Senate majority.

Mr Obama, who has been active on the campaign trail in the weeks leading up to the midterm election, spoke with a rasp in his voice on Sunday as he took aim at Mr Trump, telling the crowd that "the character of our country is on the ballot" and accusing Republicans of "shamelessly" lying.

"Unlike some people, I don't just make stuff up when I'm talking," Mr Obama said at a rally to support Senator Joe Donnelly, an Indiana Democrat. "I've got facts to back me up. I believe in fact-based campaigning. I believe in reality-based governance."

Hammering on a theme that Democratic candidates have made a centrepiece of their efforts to retake control of Congress, he contended that if Republicans "want to stand up and defend the fact that they tried to take away your healthcare, they should do so" rather than "pretend they didn't do it".

Later, at a rally for Illinois gubernatorial nominee J.B. Pritzker and other candidates in Chicago, he suggested that Republicans were supporting efforts to make it more difficult for people to vote.

"Why is it that we kind of take for granted, like, one party that specifically institutes programmes to prevent people from voting? It's a very undemocratic idea," he said.

Former vice-president Joe Biden, who is considering a 2020 White House bid, spent the final Sunday before Election Day rallying Democrats as well at a pair of rallies in Pennsylvania, the state where he was born.

"As you can tell by my voice, I've been travelling a lot," a hoarse Mr Biden said in Harrisburg, telling the crowd that he had campaigned for 63 candidates in 22 states.

He prompted cheers when he issued a veiled rebuke of Mr Trump, saying that Democrats choose "hope over fear" and "unity over division", and "most of all, we choose truth over lies".

Mr Trump mentioned Mr Obama by name several times during his rally for Georgia Republican gubernatorial nominee Brian Kemp in Macon, Georgia, the first of two such gatherings the President attended on Sunday.

At one point, Mr Trump suggested that his own crowds were bigger than those at Mr Obama's recent events and appeared to voice dissatisfaction with news coverage of the rallies.

"They'll say, 'President Trump and former President Obama had wonderful crowds,'" Mr Trump said of the media.

A monthly jobs report on Friday showed that hiring and wages grew more than they have in nearly a decade, a boon for Mr Trump and Republicans on the verge of the election.

But to the chagrin of some leading members of his party, Mr Trump has responded by de-emphasising the economy and stoking fears about illegal immigration among his mostly white supporters in an attempt to increase Republican turnout.

Late last week, Mr Trump's campaign announced that it was spending US$1.5 million (S$2.06 million) on a TV ad featuring footage of Luis Bracamontes, an undocumented immigrant who was convicted of killing two sheriff's deputies in California in 2014.

"They all say, 'Speak about the economy. Speak about the economy,'" Mr Trump told a crowd in Huntington, West Virginia, on Friday night.

"Well, we have the greatest economy in the history of our country, but sometimes it's not as exciting to talk about the economy, right?"

Mr Trump took a particularly harsh line on the issue on Sunday as he vowed to cut foreign aid to Central American nations he said had done nothing to stop a group of migrants travelling toward the United States.

"How about that caravan? Do you want to let that caravan just pour in?" Mr Trump asked in Macon, as the crowd answered with a chant of, "Build that wall."

The group of migrants now numbers about 4,000 and is in Mexico, hundreds of kilometres from the US border.

Mr Trump, who has ordered more than 7,000 active-duty troops to deploy along the Mexican border in Arizona, California and Texas, described the approaching caravan as "an invasion".

Republican National Committee Chairman Ronna McDaniel defended the President's ramped up rhetoric on immigration and race, arguing that it's possible to focus on several issues at once.

"Well, I'm with him," she said in an interview on CNN's State of the Union when asked about Mr Trump's comments on the economy. "He's talking about both... He can talk about multiple things at once."

Mr Trump will make one final campaign trail foray on Monday, when he headlines rallies in Cleveland; Fort Wayne, Indiana; and Cape Girardeau, Missouri.

Georgia's gubernatorial race took centre stage on Sunday, as Mr Kemp's office announced a "hacking" investigation of the Georgia Democratic Party and his campaign condemned the "criminal behaviour" he allegedly discovered.

Mr Kemp, who as secretary of state oversees Georgia's elections, did not provide any evidence, and his announcement was criticised by voting rights lawyers as well as Democratic nominee Stacey Abrams, who suggested that the investigation was "nothing more than a pathetic attempt to cover up for his failures".

On the Sunday morning news shows, leaders of both parties were optimistic about their chances on Tuesday.

In an appearance on ABC's This Week With George Stephanopoulos, Senator Chris Van Hollen, a Maryland Democrat, said he wouldn't predict how he thinks the election will go, but he called it a "sea change" that there is still a "narrow path to the majority" in the Senate for the Democratic Party.

Mr Van Hollen, chairman of the Democratic Senatorial Campaign Committee, credited individual candidates with focusing on the issues that matter in their home states.

And in a preview of the contentious leadership battle that awaits House Democrats after Election Day, Representative Tim Ryan, an Ohio Democrat, signalled on Sunday that he could run for Speaker if the Democrats take control of the House, saying he thinks it would be wise to elevate someone from Ohio who represents a "blue-collar area".

"I think it's important that we have this discussion and have this conversation," said Mr Ryan, who challenged Minority Leader Nancy Pelosi, a California Democrat, for the party's top spot in 2016.

"I think the American people want a change. I think a lot of Democrats want a change. And so we're going to have that discussion starting on Wednesday, and let's hope we're having that conversation about Speaker of the House and not leader of the minority party in Congress."

The congressman has said for months that he would consider another run against Ms Pelosi. He said on Sunday that several candidates will vie for the Speaker position if the Democrats win, and that it "will not be a coronation".

Representative Steve Scalise, a Louisiana Republican, said on Fox News Channel's Sunday Morning Futures that he thinks Republicans will hold on to the House majority, and that Majority Leader Kevin McCarthy, a California Republican, should replace Speaker Paul Ryan, a Wisconsin Republican, who isn't seeking re-election.

That would open up Mr McCarthy's No. 2 spot, a post Mr Scalise acknowledged he is interested in.

Mr McCarthy would face a challenge from Representative Jim Jordan, an Ohio Republican, who announced a bid for Speaker earlier this year.