President Obama strongly criticized Donald Trump's suitability for president during an August 2 news conference at the White House. (Reuters)

President Obama said Tuesday that Donald Trump is “unfit” for the presidency because he lacks “basic knowledge” of world affairs and is “woefully unprepared to do this job.”

In an attack on the Republican nominee's temperament and work ethic, Obama called on GOP leaders who have denounced some of Trump's most inflammatory statements in recent days and weeks to cut ties with their party's candidate.

“The question they have to ask themselves is if you are repeatedly having to say in very strong terms that what he has to say is unacceptable, why are you still endorsing him?” Obama asked. “What does this say about your party that he is your standard-bearer?”

Obama was responding most immediately to Trump’s belittling of the Muslim American parents of a dead U.S. soldier. But he went on to describe various statements by the Republican nominee that Obama said transcended mere “gaffes” or policy disagreements.

In the same interview in which Trump criticized Khizr and Ghazala Khan, the parents of the slain soldier, he also seemed not to realize that Russian troops were fighting on behalf of separatist rebels in Ukraine.

Trump's remarks about the Khan family prompted Sen. John McCain (R-Ariz.) to issue a lengthy, and sharply worded denunciation Monday. “I cannot emphasize enough how deeply I disagree with Mr. Trump’s statement,” McCain wrote.

In June, House Speaker Paul D. Ryan (R-Wis.) questioned Trump's insistence that a federal judge's Mexican heritage made him unfit to hear lawsuits involving the now-defunct Trump University. “It’s reasoning I don’t relate to,” Ryan said.

Ryan and Senate Majority Leader Mitch McConnell (R-Ky.) have also expressed support for the Khans.

Obama, who spoke a White House news conference with Singapore's prime minister, said the Republican leaders' words were not enough and called on McCain, Ryan and McConnell to withdraw their endorsements of Trump.

“There has to be a point at which you say this is not somebody you can support as president of the United States,” Obama said. “The fact that that has not happened makes some of these denunciations ring hollow.”

Despite policy differences with previous Republican presidential candidates, such as McCain and former Massachusetts governor Mitt Romney, Obama said he never questioned their ability to do the job. He said the Republican leaders' continued backing of their nominee “effectively endorses and validates the positions that are being articulated by Mr. Trump.”