ALBANY, N.Y.—Gov. Andrew Cuomo and state lawmakers in both chambers of the Legislature agreed on a series of new gun-control laws that would make New York the first state to put new restrictions on firearms after the Newtown, Conn., school shooting in mid-December.

The state Assembly approved the legislation on Tuesday afternoon by 104-43, less than a day after passage in the state Senate during a late-night vote with a 43-18 margin. The legislative package included nearly everything sought by Mr. Cuomo, a Democrat who has exhorted state lawmakers to lead the nation on the issue, and the governor was expected to sign the bill later Tuesday.

The measure, which would tighten the state's ban on what it defines as assault weapons, would include a ban on ammunition magazines holding more than seven bullets, increased penalties and prison sentences for some gun crimes and a requirement that mental-health providers report potentially dangerous patients to authorities.

New York already has some of the nation's most-restrictive gun laws. The legislation would close what Mr. Cuomo has called loopholes in the ban, including a provision that allows what it deems assault weapons made before 1994 to be sold. The state currently bans ammunition magazines larger than 10 bullets, except on weapons made before 1994.

The legislation would also expand background checks for most gun owners and require them to renew their license every five years, among other things.