WASHINGTON (CNN) -- The Senate passed groundbreaking legislation Thursday that would make it a federal crime to assault an individual because of his or her sexual orientation or gender identity.

The expanded federal hate crimes law now goes to President Obama's desk.

Obama has pledged to sign the measure, which was added to a $680 billion defense authorization bill.