Now, the Legislature is joining that push. The expansion will be phased in over three years.

The location of each camera will be determined by the city’s Department of Transportation. City officials said they expected every school to be covered by the expansion. The bill also widens the radius of a school zone and allows the cameras to be active for longer hours each day.

Currently, the cameras can operate from an hour before school until an hour after; under the new law, they could operate from 6 a.m. to 10 p.m.

The previous program covered only 7 percent of New York City schoolchildren.

“As someone whose own family has suffered a loss to traffic violence, this is incredibly personal,” said Mr. Gounardes, a first-term Democratic legislator who unseated a Republican who had a well-documented record of speeding.

Deborah Glick, a Manhattan assemblywoman who sponsored the bill in her chamber, called opposition to expansion “inexplicable” and “indefensible.”

Mr. Cuomo said on Tuesday that he would sign the bill. A companion bill passed on Tuesday would also create a pilot program in Buffalo.

Thirteen states currently have some form of speed camera program, according to the Insurance Institute for Highway Safety. Some, like New York’s, are limited to certain localities, while others are statewide. Nationwide, 139 communities have adopted speed cameras.

Between 2014 and 2017, New York City’s speed camera program brought in $83 million in net revenue. Proponents have always emphasized that the cameras were intended to improve public safety, not generate money.