President Trump interrupted his meetings with foreign heads of state at the Group of 20 summit in Osaka, Japan, to take a dig at Democrats participating in the party's second debate Thursday.

The president said Democratic White House contenders’ willingness to extend government health care to illegal immigrants in America will get him reelected.

All Democrats on the stage for the second night of the debates Thursday in Miami raised their hands when asked if they would give health care to migrants in the country illegally.

ILLEGAL IMMIGRANTS SHOULD GET HEALTH CARE, SAY DEMS IN NIGHT 2 DEBATE

Trump tweeted: “All Democrats just raised their hands for giving millions of illegal aliens unlimited healthcare. How about taking care of American Citizens first!?”

He then added: “That’s the end of that race!”

CLICK HERE TO GET THE FOX NEWS APP

Trump said that he “passed a TV set,” and saw the Democrats debating.

“I look forward to spending time with you rather than watching the debate,” he said, sitting next to German Chancellor Angela Merkel.

The Associated Press contributed to this report.