The US Senate has passed a bill to give more federal protection against hate crimes to gays and lesbians.

The bill is nicknamed the Matthew Shepard Bill, after the gay Wyoming teenager who was murdered in 1998.

It was passed by 68 votes to 29 and will expand federal hate crime laws to include crimes where the victims were targeted on the basis of sexual orientation, gender identity, gender, and disability.

The bill attached to the Department of Defence reauthorisation bill, a bill to provide new F-22 fighter jets.

It will now go to President Barack Obama to be signed into law.

White House spokesman Shin Inouye said: “As the president said back in April, the hate-crimes bill takes on an important civil rights issue to protect all of our citizens from violent acts of intolerance, while also protecting our freedom of speech and association. He looks forward to signing it into law.”

Gay groups have fought for years to get the bill passed.

Joe Solmonese, president of the Human Rights Campaign, said: “We look forward to President Obama signing it into law: our nation’s first major piece of civil rights legislation for lesbian, gay, bisexual and transgender people.

“Too many in our community have been devastated by hate violence. We now can begin the important steps to erasing hate in our country.”

Shepard was tortured and murdered in Laramie, Wyoming, for being gay. His murder in 1998 became a focal point for a call for hate crime legislation to be passed. His mother Judy has since become a gay rights activist and spoke at this month’s equality march on Washington.