WASHINGTON — The House voted Thursday to expand the definition of violent federal hate crimes to those committed because of a victim’s sexual orientation, a step that would extend new protection to lesbian, gay and transgender people.
Democrats hailed the vote of 281 to 146, which brought the measure to the brink of becoming law, as the culmination of a long push to curb violent expressions of bias like the 1998 murder of Matthew Shepard, a gay Wyoming college student.
Under current federal law, hate crimes that fall under federal jurisdiction are defined as those motivated by the victim’s race, color, religion or national origin.
The new measure would broaden the definition to include those committed because of gender, sexual orientation, gender identity or disability. It was approved by the House right before a weekend when gay rights will be a focus in Washington, with a march to the Capitol and a speech by President Obama to the Human Rights Campaign.
Republicans criticized the legislation, saying violent attacks were already illegal regardless of motive. They said the measure was an effort to create a class of “thought crimes” whose prosecution would require ascribing motivation to the attacker.
Representative John A. Boehner of Ohio, the House Republican leader, called the legislation radical social policy.
“The idea that we’re going to pass a law that’s going to add further charges to someone based on what they may have been thinking, I think is wrong,” Mr. Boehner said.
Republicans were also furious that the measure was attached to an essential $681 billion military policy bill, and accused Democrats of legislative blackmail.
Even some Republican members of the usually collegial House Armed Services Committee who helped write the broader legislation, which authorizes military pay, weapons programs and other necessities for the armed forces, opposed the bill in the end, solely because of the hate crimes provision.
“We believe this is a poison pill, poisonous enough that we refuse to be blackmailed into voting for a piece of social agenda that has no place in this bill,” said Representative Todd Akin of Missouri, a senior Republican member of the committee.
On the final vote, 237 Democrats were joined by 44 Republicans in support of the bill; 131 Republicans and 15 Democrats opposed it. The Democratic opponents were a mix of conservatives who were against the hate crimes provision and liberals opposed to Pentagon provisions.
The military bill has yet to be approved by the Senate. But the hate crimes provision has solid support there, and Senator John McCain of Arizona, the senior Republican on the Senate Armed Services Committee, said the overall bill outweighed his own objections to including the hate crimes measure.
Mr. Obama supports the hate crimes provision, though the White House has raised objections to elements of the bill related to military acquisitions. If signed into law, the hate crimes legislation would reflect the ability of Democrats to enact difficult measures with their increased majorities in Congress and a Democrat in the White House.
“Elections have consequences,” Mr. McCain said.
Similar hate crime provisions have passed the House and the Senate in previous years but have never been able to clear their final hurdles. Speaker Nancy Pelosi said Thursday that it was fitting that Congress was acting now, since next Monday is the 11th anniversary of Matthew Shepard’s killing. The hate crimes part of the bill is named for Mr. Shepard and James Byrd Jr., a black man killed in a race-based attack in Texas the same year.
The hate crimes legislation would give the federal government authority to prosecute violent crimes of antigay bias when local authorities failed to act. It would also allocate $5 million a year to the Justice Department to provide assistance to local communities in investigating hate crimes, a process that can sometimes strain police resources. And it would allow the department to assist in the inquiry and local prosecution if requested.
“The problem of crimes motivated by bias,” the measure says, “is sufficiently serious, widespread and interstate in nature as to warrant federal assistance to states, local jurisdictions and Indian tribes.”
Senator Carl Levin, the Michigan Democrat who heads the Armed Services Committee, said that the Federal Bureau of Investigation recorded reports of more than 77,000 hate crimes from 1998 through 2007 and that crimes based on sexual orientation were on an upward trend.
“The hate crimes act will hopefully deter people from being targeted for violent attacks because of the color of their skin or their religion, their disability, their gender or their sexual orientation, regardless of where the crime takes place,” he said.
But Representative Mike Pence of Indiana, the No. 3 House Republican, said the measure could inhibit freedom of speech and deter religious leaders from discussing their views on homosexuality for fear that those publicly expressed views might be linked to later assaults.
“It is just simply wrong,” Mr. Pence said, “to use a bill designed to support our troops to reverse the very freedoms for which they fight.”
Democrats, however, noted that the bill would specifically bar prosecution based on an individual’s expression of “racial, religious, political or other beliefs.” It also states that nothing in the measure should be “construed to diminish any rights under the First Amendment to the Constitution.”