Updated

Senate Democrats used a must-pass military spending bill to push through a controversial measure Thursday extending hate-crime protection to gays.

The bill, known as the Matthew Shepard Act, named for the gay Wyoming college student murdered 11 years ago, was opposed by conservatives because of language they said targets clergy and others who oppose homosexuality on religious grounds and who might express those beliefs publicly.

"The inclusion of the controversial language of the hate crimes legislation, which is unrelated to our national defense, is deeply troubling," said Sen. Jeff Sessions, R-Ala.

Sen. Jim DeMint, R-S.C., said the bill was a "dangerous step" toward thought crimes. He asked whether the bill would "serve as a warning to people not to speak out too loudly about their religious views."

But Sen. Ben Cardin, D-Md., said "nothing in this legislation diminishes an American's freedom of religion, freedom of speech or press or the freedom to assemble. Let me be clear. The Matthew Shepard Hate Crimes Prevention Act targets acts, not speech."

To assure its passage after years of frustrated efforts, Democratic supporters attached the measure to a must-pass $680 billion defense policy bill the Senate approved 68-29. The House passed the defense bill earlier this month.

Hate crimes law enacted after the assassination of Martin Luther King, Jr., in 1968 centered on crimes based on race, color, religion or national origin.

The expansion has long been sought by civil rights and gay rights groups. Conservatives have opposed it, arguing that it creates a special class of victims.

Some 45 states have hate crimes statutes, and the bill would not change current practices where hate crimes are generally investigated and prosecuted by state and local officials.

But it does broaden the narrow range of actions — such as attending school or voting — that can trigger federal involvement and allows the federal government to step in if the Justice Department certifies that a state is unwilling or unable to follow through on an alleged hate crime.

The measure also provides federal grants to help state and local governments prosecute hate crimes and funds programs to combat hate crimes committed by juveniles.

"As we learned in the civil rights era, sometimes communities need assistance and resources from the federal government when they have to confront the most emotional and dangerous kinds of crimes," said Sen. Michael Bennet, D-Colo.

The bill also creates a federal crime to penalize attacks against U.S. service members on account of their service.

Attorney General Eric Holder said nearly 80,000 hate crime incidents have been reported to the FBI since he first testified before Congress in support of a hate crimes bill 11 years ago. "It has been one of my highest personal priorities to ensure that this legislation finally becomes law," he said.

The FBI says more than half of reported hate crimes are motivated by racial bias. Next most frequent are crimes based on religious bias, at around 18 percent, and sexual orientation, at 16 percent.

Tony Perkins, president of the conservative Family Research Council, said the measure was "part of a radical social agenda that could ultimately silence Christians and use the force of government to marginalize anyone whose faith is at odds with homosexuality."

The Associated Press contributed to this report.