Mayor Bill de Blasio signed legislation Friday morning giving immediate pay raises to New York City elected officials.

The raises are retroactive to Jan. 1 and went into effect with the mayor’s signature.

The legislation is actually a package of four bills. The pay-raise bill passed 40-7 on Feb. 5.

The legislation also prohibits most outside income, eliminates stipends for leadership posts and converts the job of City Council member to full-time from part-time.

“This is a fundamentally progressive piece of legislation,” said Frederick A. O. (“Fritz”) Schwarz Jr., head of a blue-ribbon pay raise commission that made the recommendations.

Pay raises would also go to the mayor, who would make $258,750; other raises include $212,800 for the city’s five district attorneys, $209,050 for the comptroller, $184,800 for the public advocate, $179,200 for the five borough presidents and $164,500 for the council speaker, who heads the body.

The council went beyond the Schwarz panel’s recommendations by giving members $10,000 more than recommended.

On Friday, Schwarz said he disagreed with the bump but hailed legislation overall.

Council members currently are paid $112,500. It’s the first pay raise since 2006.

De Blasio has said he would decline his raise unless he is re-elected.