After months of fighting over 1,000 new police officers, the mayor and City Council have reached a deal to add 1,300.

It was announced Monday night as part of a $78.5 billion city budget agreement.

The new officers will cost the city $170 million, but it's expected the city will save $70 million in overtime and other initiatives.

The mayor says 300 of the new officers will be assigned to counterterrorism. There will also be a new approach to community policing.

The mayor had repeatedly opposed expanding the NYPD, putting him at odds with the police commissioner and some City Council members, but he says this deal is good for the city.

"This budget, as always, is a statement of our values," de Blasio said. "The focus has been on being fiscally responsible, on continuing to build a progressive vision for this city, and being honest about what it really costs and how we have to do it. And I'm proud to say this budget is not only on time, it's early."

"It's going to make a difference in every neighborhood across this great city," said City Council Speaker Melissa Mark-Viverito. "Whether you're in Staten Island, the Bronx, Queens, Brooklyn or Manhattan, it's a budget that works for you. It's a budget that defends the vulnerable, will keep our economy on track, and prioritizes public safety."

The budget will go to a vote before the full Council later this week, where it is expected to be approved.