White House Press Secretary Josh Earnest decried Ben Carson’s remarks for suggesting that a Muslim would not be qualified to be president of the United States, calling it unconstitutional.

“I actually think the views articulated by Dr. Carson are entirely inconsistent with the Constitution that actually does guarantee the freedom of religion in this country,” he told reporters at the White House this afternoon, criticizing the Republican party for voicing “offensive” views to get votes.

Earnest’s comments echoed a message on Twitter posted by former Secretary of State Hillary Clinton, who criticized the comments for the same reason.

“Can a Muslim be President of the United States of America?” she wrote, posting text from the Constitution asserting that “No religious test shall ever be required as a qualification to any office or public trust under the United States.”

“In a word: Yes,” she concluded. “Now let’s move on.”

During his press conference, Earnest warned Republicans to stay away from offensive rhetoric which he said was not consistent with the majority of Americans’ feelings.

“Ultimately there will be consequences. Certainly those views will be taken into account by voters both in the primary but also in the general election,” he said.

On Friday, Earnest denounced the entire Republican party for failing to criticize the racial rhetoric used by a Donald Trump supporter who insisted that President Obama was a Muslim.

“Those are the priorities of today’s Republican party, and they’ll continue to be until someone in the Republican party decides to summon the courage to stand up and change it,” Earnest said. “This is a cynical strategy that too many Republican politicians have dabbled in, because for some of them it’s proved to be successful.