Obama signed the bill in the East Room, adding some fanfare to draw attention to his message of fiscal responsibility and support for the military.
He spoke more personally about the new civil rights protections. A priority of the late Sen. Edward M. Kennedy, D-Mass., that had been on the congressional agenda for a decade, the measure is named for Matthew Shepard, the gay Wyoming college student murdered 11 years ago.
Obama acknowledged Shepard's mom, Judy, and remembered that he had told her this day would come. He also gave a nod to Kennedy's family. Going forward, Obama promised, people will be protected from violence based on "what they look like, who they love, how they pray or why they are."
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. They also have been concerned that it could silence clergymen or others opposed to homosexuality on religious or philosophical grounds.