Donald Trump at a campaign event in Spartanburg, S.C. on Nov. 20, 2015. (Rainier Ehrhardt/Reuters)

Donald Trump on Friday backed away from the idea that he wants to create a database to track Muslims in America as fellow presidential candidates blasted the proposal as “abhorrent” and “shocking.”

Trump said the notion that he would implement a database as a way to follow Muslims was not his.

“I didn’t suggest a database — a reporter did,” Trump tweeted Friday. “We must defeat Islamic terrorism & have surveillance, including a watch list, to protect America.”

NBC News asked the candidate Thursday night whether there should be a “database system that tracks Muslims” in the country. Trump said “there should be a lot of systems beyond databases” and started talking about the U.S. border and building a wall across it. When asked whether it was something a Trump White House would implement, the candidate said,“Oh, I would certainly implement that — absolutely.”

Trump appeared somewhat confused — or annoyed — when asked about the proposal later in the night. When asked to explain the difference between a Muslim database in the United States and the registry of Jews that once existed in Nazi Germany, Trump repeatedly said, “You tell me.”

Yahoo News first asked Trump about a database Thursday. The candidate did not take a stance but raised concerns about Muslims in the United States. Trump has said that he would close mosques and would not rule out the idea of giving Muslims identification cards noting their religion.

“I find it abhorrent that Donald Trump is suggesting we register people,” former Florida governor Jeb Bush said Friday on CNBC.

“You’re talking about internment. You’re talking about closing mosques. You’re talking about registering people. And that’s just wrong — I don’t care about campaigns,” Bush said. “It’s not a question of toughness — it’s manipulating people’s angst and their fears. That’s not strength. That’s weakness.”

Sen. Ted Cruz (R-Tex.), who introduced a bill that would have barred Syrian refugees from coming to the United States, said he does not think that people should be tracked by their religion. Democrats blocked Cruz’s bill Thursday.

“I’m a big fan of Donald Trump’s, but not a fan of government registries of American citizens,” the presidential candidate said in Sioux City, Iowa. “First Amendment protects religious liberty.”

Another GOP hopeful, Ohio Gov. John Kasich, said Trump’s comments show that he is “unable to unite and lead” the country.

“The idea that someone would have to register with the federal government because of their religion strikes against all that we have believed in our nation’s history,” he said in a statement.

Sen. Lindsey O. Graham (R-S.C.), who is also running, warned that “xenophobia” was not a sensible response to the threat of the Islamic State.

“We’re fighting against people who want to force you to bow,” Graham said in New Hampshire. “The answer to that is not forcing tyranny on other people.”

Sen. John McCain (R-Ariz.), the 2008 presidential nominee who is campaigning alongside Graham this weekend, told a crowd in Hudson, N.H., that the idea of “registering” Muslims was outrageous.

“There are 3,500 people of Muslim faith that are serving in our armed forces,” said McCain. “Does this mean we’d have to take people out, who are fighting for us, and register them?”

A number of Republican presidential candidates have said that Syrian refugees should be barred from entering the United States because the Obama administration cannot determine whether they are aligned with the Islamic State. Thursday, Sen. Marco Rubio (R-Fla.) was asked whether he agrees with Trump’s assertion that mosques should be closed. “It’s not about closing down mosques,” he said. “It’s about closing down any place — whether it’s a cafe, a diner, an Internet site — any place where radicals are being inspired.”

More than two dozen governors have said they do not want Syrian refugees to come to their states. The mayor of Roanoke, Va., said he would turn away Syrian refugees, making a comparison to Japanese Americans put in internment camps during World War II. And a Texas politician likened refugees to rattlesnakes. The Roanoke mayor has since apologized.

Ibrahim Hooper, spokesman for the Council on American-Islamic Relations, said Trump and his top rival for the GOP nomination, neurosurgeon Ben Carson, have participated in the mainstreaming of anti-Muslim sentiment.

“We expected a rise in anti-Muslim rhetoric in the presidential election cycle, but we didn’t realize it would get this bad,” he said. “There are comments . . . by leading Republican candidates that harken back to the dark days of the 1930s.”

Trump was defended by some conservatives, who accused the media of twisting his words.

“He has not confirmed a database,” radio host Rush Limbaugh said Friday. “He has not confirmed registration of Muslims. He’s changed the question to his favorite subject, the wall and the border and keeping illegal immigrants out.”

“This isn’t going to hurt Trump,” Limbaugh said, according to a transcript. “Even their journalistic malpractice is not going to hurt Trump.”

Trump spokeswoman Katrina Pierson was asked Friday about the database issue on Fox Business News and said the candidate “is just saying he won’t rule anything out,” according to CNN.

“Those are a reporters’ words and now everyone is saying it’s all Trump,” CNN reported her saying on the business network. “He’s simply saying he won’t take anything off the table.”

Democrat Hillary Clinton on Friday tweeted that the idea of tracking people based on their religion is “shocking rhetoric” and “should be denounced by all seeking to lead this country.”

Speaking at campaign events in Tennessee on Friday, Clinton said the rhetoric from Republican candidates on Muslim refugees is “inflammatory.”

Proposing to “shut our borders” to refugees is not going to work, Clinton said.

“Part of the reason why we are great already, Mr. Trump, is because we have the most unusual ability to bring people here and turn them into Americans,” Clinton said. “And Mr. Trump has attacked Mexican immigrants, he’s attacked women, now he’s attacking Muslim Americans.”

“At some point you’ve got to ask yourself: ‘Wait a minute — is that the kind of country that we are?’ ” Clinton asked.

New York Mayor Bill de Blasio, a Democrat, called Trump a “blowhard” and likened the idea of a database to propaganda.

Carson, who has said that he would not support a Muslim for president, was repeatedly asked Friday whether he thought the country should track Muslims.

“I think we should have a database on everybody who comes into this country,” Carson said in Concord, N.H. Told that Trump had proposed tracking Muslims already in the United States, Carson added that, “hopefully, we already have a database on every citizen who is already here. If we don’t, we are doing a very poor job.”

Jose DelReal and Ed O’Keefe in Washington, Jenna Johnson in Des Moines, Abby Phillip in Nashville and David Weigel in New Hampshire contributed to this report.