WASHINGTON - A Senate committee on Thursday rebuked Donald Trump by endorsing a measure that says barring individuals from entering the United States based on religion would be un-American.

The Republican presidential front-runner has called for blocking Muslims from entering the country in the aftermath of attacks in the United States and abroad.

The Senate Judiciary Committee voted 16-4 for the nonbinding amendment pushed by Sen. Patrick Leahy of Vermont, the panel's top Democrat. The language was added to an unrelated bill on nuclear terrorism.

The four Republicans who opposed it included GOP presidential candidate Ted Cruz of Texas. Cruz was not present but voted by proxy, as is regular practice when lawmaker cannot attend a committee vote.

The amendment states that "it is the sense of the Senate that the United States must not bar individuals from entering into the United States based on their religion, as such action would be contrary to the fundamental principles on which this nation was founded."

Leahy said the amendment sends "a clear and direct message that America welcomes people from all countries of all faiths."

Among the 16 backing Leahy's amendment was the committee chairman, Sen. Charles Grassley (R., Iowa), who faces reelection next year.

South Carolina Sen. Lindsey Graham, another GOP candidate for president, also backed the measure.

After the hearing, Cruz spokesman Phil Novack called the amendment a "political stunt."

"A nuclear terrorism bill is not the place for political games," Novack said.

After voting against the amendment, Cruz voted in support of the nuclear terrorism bill to which it was attached, again by proxy. The committee approved that bill 17-3.