U.S. Republican presidential candidate Donald Trump waves to the crowd at a Pearl Harbor Day rally aboard the USS Yorktown Memorial in Mount Pleasant, South Carolina, Dec. 7, 2015. Reuters

Republican presidential hopeful Donald Trump’s call for a ban on all Muslims traveling into the United States disqualifies him from being president, the White House press secretary said Tuesday. Josh Earnest said Trump’s comments not only increase anti-Muslim sentiment but also endanger national security, Talking Points Memo reported.

"What Donald Trump said yesterday disqualifies him to serve as president," Earnest said, according to a reporter at Tuesday's briefing. "The Trump campaign for months now has had a 'dustbin of history'-like quality to it, from the vacuous sloganeering to the outright lies to even the fake hair — the whole carnival barker routine we've seen for some time now. The question now is about the rest of the Republican party and whether or not they're going to be dragged into the dustbin of history with him."

Trump said Monday the U.S. should bar Muslims from entering the country, saying hatred among Muslims for Americans is unprecedented and that the U.S. should determine where the hatred comes from, the New York Times reported. Trump's call for a ban came several days after a deadly mass shooting in San Bernardino, California, which authorities said was perpetrated by two Muslims who may have been radicalized.

Earnest’s comments follow an earlier condemnation from a GOP lawmaker, among a range of mostly negative reactions from both sides of the political aisle. Rep. David Jolly, R-Fla., said in a House speech Tuesday that Trump should withdraw his presidential candidacy because of the comments, the Hill reported. Billionaire businessman Trump has topped the GOP polls for the past few months.

“I’m a born-again Christian. I believe in the saving grace of the Jesus Christ that I call my God. And the beautiful thing about this country is I can stand here on the House floor among my peers and in front of the nation and declare that faith without fear of any reprisal,” Jolly said, according to the Hill. “But if Donald Trump has his way, we may not have the liberty to do that anymore.”

Many lawmakers, including those outside the United States, have criticized Trump’s call for banning Muslims from coming into the U.S., saying it’s unconstitutional to single people out because of their faith, Reuters reported.

French Prime Minister Manuel Valls said that Trump is feeding hatred, and British Prime Minister David Cameron has said Trump’s comments are unhelpful and wrong. U.S. Homeland Security Secretary Jeh Johnson said that Trump’s plan would undermine national security.