The Senate unanimously approved a bill banning Iran’s ambassador to the United Nations from the United States on Monday night.

Sen. Ted Cruz’s proposal would prevent known terrorists from entering the United States as ambassadors to the U.N. Hamid Aboutalebi, who participated in the 1979 hostage-taking of Americans in Tehran, has been appointed ambassador to the UN by Iranian President Hassan Rouhani, a move described as a “slap in the face” to the U.S. by Sen. Lindsey Graham (R-S.C.) and “unconscionable” by Cruz.

“There are no circumstances in which the United States should grant such a person a visa, and our immediate concern is to prevent Mr. Aboutalebi from ever setting food on American soil,” Cruz said on Monday. “I am encouraged that the United States Senate can speak unanimously in a bipartisan voice defending the interest of our nation.”

Cruz moved to pass the bill by unanimous consent shortly after voting on a bill extending emergency unemployment compensation. Anyone could have objected to the bill, but Cruz cleared the way for the legislation after speaking over the weekend with Sen. Chuck Schumer (D-N.Y.), a fellow Iran hawk, to clear the way for the bill, sources in both parties said.

“Iran’s leadership should not have have unnecessarily escalated tensions with the United States by seeking to appoint an ambassador to the United Nations who materially aided terrorists who abducted American citizens,” Schumer said.

Senators in both parties have raised concerns over the prospect of Aboutalebi’s nomination, and Cruz last week came to the Senate floor to advertise his legislative push to bar the controversial diplomat from U.S. soil.

Over the Obama administration’s concerns that Cruz’s legislation was too broad, a provision was inserted to require that people like Aboutalebi must have been found to participate in terrorist activities before they can be banned.

After that alteration was made, Schumer told Cruz that he would not object to the bill, clearing the bill for passage on the Democratic side. Cruz thanked Schumer by name on the Senate floor on Monday — a rare moment of agreement between the conservative firebrand and Senate Democrats’ messaging guru.

”It may be a case of strange bedfellows, but I’m glad Senator Cruz and I were able to work out a bill that would prevent this terrorist from stepping foot on American soil,” Schumer said after the bill’s approval.

The discussions between Cruz and Schumer were first reported by the Washington Post.