ALBANY — Gov. Andrew M. Cuomo signed into law a sweeping package of gun-control measures on Tuesday, significantly expanding a ban on assault weapons and making New York the first state to change its laws in response to the mass shooting at a Connecticut elementary school.

Mr. Cuomo signed the bill less than an hour after the State Assembly approved it by a 104-to-43 vote on the second full day of the 2013 legislative session. The State Senate, which had in the past resisted more restrictive gun laws, approved the measure 43 to 18 on Monday night.

“I am proud to be part of this government, not just because New York has the first bill, but because New York has the best bill,” the governor, a Democrat, said at a news conference. “I’m proud to be a New Yorker because New York is doing something — because we are fighting back.”