The House on Friday rejected an amendment to a must-pass annual defense bill that would have required the military to study the link between Islamic doctrine and terrorism and make recommendations for identifying Islamic preachers promoting extremist ideology.

The amendment, by Rep. Trent Franks (R-AZ) fell short by nine votes, 208-217. All Democrats voted against it, and 27 centrist Republicans joined the Democrats.

That list included Reps. Justin Amash (MI), Vern Buchanan (FL), Chris Collins (NY), Barbara Comstock (VA), Ryan Costello (PA), Carlos Curbelo (FL), Charlie Dent (PA), John Faso (NY), Michael Fitzpatrick (PA), French Hill (AR), David Joyce (OH), John Katko (NY), Jason Lewis (MN), Frank LoBiondo (NJ), Patrick Meehan (PA), Dan Newhouse (WA), Erik Paulsen (MN), Dave Reichert (WA), Ileana Ros-Lehtinen (FL), Steve Russell (OK), Mark Sanford (SC), Steve Stivers (OH), Dave Trott (MI), Michael Turner (OH), Fred Upton (MI), Greg Walden (OR), and Don Young (AK-AL).

Specifically, the amendment would have required the Pentagon to conduct assessments on the use of “violent or unorthodox Islamic religious doctrine to support extremist or terrorist messaging and justification.”

The studies would have been undertaken by U.S. government employees from relevant departments and agencies with appropriate background and expertise, with the assistance of experts from academia or another industry.

The study would have identified major or significant identifiable Islamic religious doctrines, concepts, or schools of thought used by various extremist groups for specific purposes — such as recruitment, radicalization, financing or propaganda.

It would also include recommendations for identifying key thought leaders or proponents for these major or significant identifiable Islamic religious doctrines, concepts, or schools of thought; and recommendations for technological capability, training improvements, or process developments to speed the identification of harmful or destabilizing Islamic religious doctrines, concepts, or schools of thought used by extremist groups.

However, Muslim lawmakers, interest groups and civil rights groups argued the amendment would unfairly target Muslims.

“If you have an amendment that says we’re going to study one religion and only one, we’re going to look at their leaders and put them on a list — only them — and you are going to talk about what’s orthodox practice and what’s unorthodox, then you are putting extra scrutiny on that religion,” Minnesota Democrat Rep. Keith Ellison said, according to Politico.

Ellison, who is Muslim, met with Franks to try to persuade him to withdraw the proposal, telling him: “You are abridging the free exercise of that religion. This is the wrong way to do what he’s trying to do.”

Ellison tweeted after the amendment’s defeat: “Good happens – even in Congress! Franks Amendment singling out Muslims rejected; Congress declines to ‘abridge free exercise’ of religion.”

Good happens – even in Congress! Franks Amendment singling out Muslims rejected; Congress declines to "abridge free exercise" of religion. — Keith Ellison (@keithellison) July 14, 2017

Franks, who is the chairman of the International Religious Freedom Caucus, said in an interview that he was not infringing on the First Amendment’s protection of religious freedom, according to Politico.

“We’ve worked very hard to protect the religious freedom for everybody,” he said, according to the outlet. “But it is important that we empower America to identify those heroic Muslims within the world that will help us begin to delegitimize this ideology of global jihad.”

“Right now, there is a certain spectrum within the Islamist world that is at the root of the ideological impulse for terrorism,” he said. “Ironically, Muslims are the prime targets of these groups. To suggest that this is anti-Muslim is a fallacy, and I think that anyone who really understands it knows that.”

Franks said he will try to work with colleagues and modify the amendment so it will pass.

Conservative Review writer Daniel Horowitz slammed the House vote:

Before we throw our troops into untenable military campaigns, isn’t it prudent that we understand the threat doctrine of our enemy and identify who we are fighting? Evidently, that is out of bounds for the majority of the politicians in Washington. They think that the weather and castration surgeries are more within the purview of the military.

It was the 9/11 attack, masterminded by Osama Bin Laden, the leader of terrorist organization al Qaeda, that prompted the Afghanistan War and contributed to public support for the Iraq War. Hundreds of thousands of American forces have been sent to the Middle East and South Asia to fight terrorists.