President Obama said Tuesday that Donald Trump should "stop whining" that the election might be rigged and focus on campaigning for votes instead. (Pablo Martinez Monsivais / Associated Press)

President Obama all but invited Donald Trump on Tuesday to jump into a fight with him, baiting the Republican nominee as he faces an overwhelming disadvantage in the polls just three weeks before election day.

Speaking to reporters at the White House, Obama mocked Trump for complaining that the vote-counting system may be “rigged” while the race is still afoot.

"If you start whining before the game’s even over, if whenever things are going badly for you and you lose, you start blaming somebody else, then you don’t have what it takes to be in this job," Obama said, his voice cracking with amusement.

"… I’d invite Mr. Trump to stop whining and go try to make his case to get votes."

Though taking on the popular sitting president would be an unconventional strategy at this point, Trump has proved repeatedly that he is susceptible to provocation, and Obama seemed to be aiming straight for that vulnerability.

Trump did not immediately respond, neither at his first rally of the day, in Colorado Springs, Colo., nor on Twitter, his preferred method of communication.

Standing alongside Italian Prime Minister Matteo Renzi, Obama vowed to be more “subdued” talking about the presidential race than he has been on the campaign trail while stumping for Hillary Clinton. As it turned out, he cast more shade in the dignified setting of a Rose Garden news conference than at almost any turn in recent weeks.

He mocked Trump for his “flattery” of Russian President Vladimir Putin. He faux-marveled at how some Republicans abandoned their skepticism of Putin to support Trump.

Then he turned to Trump’s complaints of a “rigged system,” suggesting that Trump is discrediting the election process rather than trying to sell his ideas to voters.

“It happens to be based on no facts,” he said. Serious analysts, he said, “will tell you that instances of significant voter fraud are not to be found.”

Trump’s protests fail to show “the kind of leadership and toughness” voters want in a president, Obama said.

The official visit of the Italian prime minister for a state dinner, the 13th and final of Obama’s presidency, was replete with allusions to the unusual and unprecedented presidential contest.

As he formally welcomed Renzi to the White House, Obama noted that “America was built by immigrants. America is stronger because of immigrants,” he said.

Renzi spoke of building “bridges, not walls.” And he said Italians are more interested in the American presidential election than in their own upcoming constitutional referendum.

But the attention was on Obama’s parry with Trump.

Trump is “trying to distract from the bad story line of his verbal and physical assaults on women,” said senior Clinton advisor Jennifer Palmieri. “And because he’s losing and he wants to blame somebody else — and that’s what losers do.”

Obama has proved to be more able than anyone to provoke Trump, said Paul Begala, a Democratic strategist.

“He taunts and baits Trump, he ridicules and humiliates him. And then, just to show us all how it’s done, he takes the whole absurd circus and contextualizes it, reminding us that the person who occupies the Oval Office has the power to destroy all life on earth — something not to be trifled with. He is conducting a master class on how to take on a bully.”

Los Angeles Times staff writer Evan Halper aboard the Clinton campaign plane contributed to this report.

ALSO:

Trump claims without evidence that the election is rigged, but officials say that’s not how voting works

One big reason the WikiLeaks emails aren’t as damaging for Hillary Clinton: Donald Trump

Outbid, outhustled, outmuscled: Trump has never been able to conquer Southern California