A law allowing cyclists to follow pedestrian walk signs rather than vehicle traffic lights coasted through the City Council Tuesday.

The legislation — slated to go into effect in November — allows bike riders cruise through red lights to get a brief head start on cars at intersections.

Of the 51 city council members, 37 voted in favor of the change and seven voted against it. Three members abstained and four were absent.

“We must do everything we can to prevent more cyclists fatalities. This is a common sense easy solution,” said Council Speaker Corey Johnson.

A Department of Transportation study last year showed the change — which is supported by Mayor de Blasio — makes city streets safer for cyclists, according to Councilman Carlos Menchaca (D-Brooklyn), who sponsored the bill.

“Treating bicycles like cars is at the heart of why cyclists continue to suffer and die,” Menchaca said Tuesday.

“With cyclist injury and fatalities increasing, this preventive measure has turned into a necessity.”

Seventeen cyclists have died on the city’s streets this year — with the most recent two deaths coming Tuesday as the new law was passed.

Riders say the change will make them more visible to cars — although critics have said they fear it will make streets more chaotic.

“There’s a reason the city designed a head start for pedestrians, and now the Council is taking it away,” Councilman Kalman Yeger previously told The Post.