WASHINGTON — Donald Trump pulled out of a Republican gathering in South Carolina Friday as he took hits from members of both parties for failing to correct a questioner who said President Obama is a Muslim.

“Mr. Trump has a significant business transaction that was expected to close Thursday. Due to the delay he is unable to attend today’s Heritage Action Presidential Forum,” Trump’s campaign announced in a release Friday.

Trump had been scheduled to join most of the Republican field at the meeting of the influential conservative group.

Trump drew condemnation Friday from some of his rivals for his failure to confront the questioner at a New Hampshire town hall who had labeled the president a Muslim, asked what he would do to “get rid” of Muslims and mentioned Islamic “training camps.”

New Jersey Gov. Chris Christie told NBC Friday, “I wouldn’t have permitted that. If someone brought that up at a town hall meeting of mine, I would’ve said, ‘No, listen. Before we answer, let’s clear some things up for the rest of the audience. And I think you have an obligation as a leader to do that.”

“If that person had been in my event I would have called him out in it,” Hillary Clinton said at a press conference after a campaign event in New Hampshire.

“Not only is it out of place and wrong it is totally factually untrue.”

Sen. Bernie Sanders demanded that Trump apologize for “continuing the lie that the president is not an American and not a Christian.”

As the question was being asked Thursday (see video above), Trump — who has questioned whether Obama was born in the US — laughed and interjected, “We need this question. This is the first question.”

Trump then responded by saying: “A lot of people are saying that and a lot of people are saying that bad things are happening out there. We’re going to be looking at that and a lot of different things.”

Trump’s campaign manager, Corey Lewandowski, told CNN that Trump didn’t hear the part of the question about Obama being a Muslim.

“All he heard was a question about training camps, which he said we have to look into,” Lewandowski said. “The media want to make this an issue about Obama, but it’s about him waging a war on Christianity.”

“You had a chance here to show who you were,” said Sen. Lindsey Graham (R-S.C.), who like Christie is vying for the GOP presidential nomination. “You have to push back,” Graham said, referencing Sen. John McCain’s decision to shut down a woman who falsely called Obama an Arab at a town hall in 2008.

White House press secretary Josh Earnest used the incident to indict the entire GOP field.

“Mr. Trump isn’t the first Republican politician to countenance these kinds of views in order to win votes. In fact, that’s precisely what every Republican presidential candidate is doing when they decline to denounce Mr. Trump’s cynical strategy,” Earnest said.

The first poll issued since the GOP debate Tuesday — where some analysts said Trump stumbled– showed him gaining on his rivals.

The poll by DC-based Morning Consult had Trump at 36 percent, up 3 percentage points from last week. Dr. Ben Carson was second at 12 percent. Carly Fiorina, widely considered the debate winner, zoomed up to 10 percent from 3. Marco Rubio also improved sharply to 9 percent from 3 percent earlier.