NEW YORK (CBSNewYork/AP) — New York City’s $78.5 billion budget agreement now heads to the City Council after officials announced that nearly 1,300 new police officers will be hitting the streets.

The entire Fiscal Year 2016 budget will go to a vote before the full council later this week. The vote is expected to largely be a formality.

READ MORE: Columbia University Student Davide Giri Stabbed To Death Near Morningside Park; Suspected Gang Member In Custody, Sources Say

The new officers, who were announced amid a headline-grabbing surge in crime in certain neighborhoods, will cost the city $170 million. The costs will be offset by $70 million in savings, largely by creating a cap on department overtime. About 300 of the new officers will be assigned to counterterrorism.

The deal was made public and sealed with a handshake and hug between Mayor Bill de Blasio and City Council Speaker Melissa Mark-Viverito, both Democrats, at City Hall late Monday.

“It is the right thing to do,” de Blasio said. “Through a lot of work, we came to a plan that allows us to strengthen our police force while encouraging deepening of reform and finding key reforms on the fiscal front.”

“By expanding community policing and bringing police and communities they serve closer together, we can continue to bridge the divide while also making our city safer,” said Mark-Viverito.

Additionally, the budget authorizes the hiring of 400 administrative aides to take over desk jobs currently filled by police officers. Those officers will then be freed up to be deployed on the street for increased community policing.

A year ago, de Blasio flatly denied Mark-Viverito’s call to hire 1,000 new officers, pointing to record low crime rates and suggesting that the resources would be better used elsewhere to fulfill the mayor’s vision of a liberal, activist government that would better the lives of the less fortunate.

For much of the past year, City Hall stuck to that script. But police Commissioner Bill Bratton began intermittently advocating for the new hires, Mark-Viverito continued to push the plan as a way to improve outreach in neighborhoods often suspicious of police and pockets of the city suffered a surge in shooting and homicides in recent weeks.

Though overall crime is down 6.7 percent from this time a year ago, shootings and murders are up. Murders have risen from 138 to 154, 11 percent, through Sunday, while shootings have gone up from 488 to 515.

A total of 1,297 new officers will be hired, the first major headcount increase in decades. Many political observers expected that a compromise would be reached and the city would hire fewer than the 1,000 officers requested by the council, in part due to eventual pension costs stemming from new hires.

READ MORE: FDNY Probationary Firefighter Vincent Malveaux Dies After Medical Episode During Training Exercise

But de Blasio said the surprise jump in hiring was not due to rising crime, rather to the overtime savings, though a hard cap on overtime was not yet set. The mayor particularly pegged it to Bratton’s ongoing efforts to revamp police department strategies; the commissioner is expected to announce several new initiatives later this week.

Some police critics were quick to upbraid the deal.

“It’s disappointing and perplexing that the city budget will increase the NYPD headcount when systemic problems with police accountability and culture that allow New Yorkers to be abused and killed have yet to be fixed,” said Monifa Bandele for the Communities United for Police Reform.

The issue of policing has always been a delicate one for de Blasio, who dismissed criticisms that he caved to the council and public pressure.

He was elected on a campaign to improve relations between police and minorities, largely by curbing the overuse of stop and frisk, a tactic that allowed police to stop anyone deemed suspicious. Its critics, however, said it discriminated against black and Latino men.

With his push to reform the NYPD as a backdrop, de Blasio then faced an open revolt from the rank-and-file police union in the wake of the Eric Garner chokehold death. Though an uneasy truce took hold, the de Blasio team has been particularly wary of a rise in crime, knowing it could undermine the mayor’s agenda.

The budget deal was a clear win for Mark-Viverito, who has largely shaken off an early reputation that she would not challenge her ally de Blasio. Several of her other proposals were adopted, including the creation of a $1.4 million bail fund for those charged with low-level offenses yet stuck in the city’s jails.

“It’s a budget that is going to make a difference for every neighborhood in our city,” said Mark-Viverito. “It’s a budget that defends the vulnerable who keep the economy on track and prioritizes public safety.”

The budget, up from $75 billion a year ago, also includes $39 million to keep city libraries open six days a week, nearly $12 million to bolster struggling schools and $17.9 million to begin phasing-in free breakfast at all city elementary schools, which would serve 339,000 students by Fiscal Year 2018.

“We don’t want to mortgage the future, we don’t want to put all the problems of the future on the next generation,” de Blasio said. “It really protects people while being fair to the tax payer.”

Other new investments include $21 million for mental health programs, a pet project of First Lady Chirlane McCray, more money for programs benefiting powerless populations like the elderly, homeless and veterans and, in a sure winner, money to keep the city beaches open for a week past Labor Day.

MORE NEWS: 'We're In An Official Blood Emergency Right Now': New York Blood Center Calls For Donations

(TM and © Copyright 2015 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2015 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)