The state legislature has reached a deal on raising the age of criminal responsibility to 18, a measure that would bring the state in line with the vast majority of the country, and a sticking point for conservative legislators that stalled budget talks and brought the government to the verge of shutting down.

The New York Times reports that the Assembly agreed on a bill late Tuesday outlining the terms of raising the age, which include carve-outs that allow prosecutors to charge children as adults under certain circumstances. The paper says that the Senate is set to approve the bill today. The previous budget expired on Friday as talks ground on, and on Monday legislators passed a stopgap temporary spending plan that keeps the state running through May 31st. The ever-wily Governor Cuomo included funding for his nominal economic development projects, which are at the center of criminal prosecutions of his aides and appointees and have produced few promised jobs, while leaving uncertainty for school districts, which rely on state funding and have to finalize budgets in May. State legislators also don't get paid until they pass a new budget.

New York is one of two states, the other being North Carolina, that charges 16- and 17-year-olds suspected of crimes as adults across the board. Activists and Democrats who this year made the Raise the Age campaign a rallying cry had sought a comprehensive change that would move juvenile criminal cases to family court, and keep children out of adult jails. The compromise would only move misdemeanor charges to family court, according to a summary viewed by the Times. Nonviolent felony charges would be handled in a new section of Criminal Court for kids, and some of those cases would be later channeled to family court unless a prosecutor could prove "extraordinary circumstances."

Violent felonies would stay in criminal court, but could be moved to family court unless a "deadly weapon" was used, the victim suffered "significant physical injury," or the suspect was accused of sexual misconduct.

Research suggests that the human brain is not fully developed until age 25, and that adolescents are by nature more impulsive than adults. Children jailed in adult facilities are more likely to be beaten by staff or attacked with a weapon by inmates, more likely to be raped, more likely to commit suicide, and more likely to be rearrested than their counterparts who go through the juvenile jail system.

Prior to the deal, state Sen. Thomas Croci (R-Long Island), staked out his opposition by saying in a statement that Cuomo and Assembly Speaker Carl Heastie “care more about keeping teenage drug gang members, murderers and rapists out of jail than they do about funding public schools, providing tax relief for families and rebuilding the state’s infrastructure.

“On behalf of the men, women and children I represent, I will not go along with the governor’s budget, which will lead to our communities being less safe in the face of violent criminal drug gangs who slaughter our kids in cold blood."

Following the tentative agreement, Heastie, a Bronx Democrat, said in a statement, "This law will mean so much to so many young people and their families," continuing that he had "seen firsthand the devastating consequences of families torn apart and lives cut short by an ineffective policy of throwing children into adult prisons."

Raise the Age NY, a coalition including the NAACP and the Children's Defense Fund New York, did not respond to a call and email seeking comment.

Cuomo was a phantom throughout budget negotiations, disappearing last Monday and not resurfacing even to explain his temporary spending proposals. He returned to the public eye on Tuesday, after the bills passed, and seemed to taunt legislators, who are supposed to leave Albany today and break until the 24th.

"There’s no great rush at this point to get anything done," Cuomo said, pointing to the late May expiration date of the extender.

Legislators, meanwhile, are missing paychecks. Heastie indicated that they could stay until Friday to hammer out the budget if need be. Renewing the developer-friendly 421-a tax credit program and lifting the cap on the number of charter schools in the state have also been contentious issues.

New York has a long history of late budgets, and Cuomo had prided himself on working to finalize budgets on time each of his first six years in office. Now that things have run off the rails, he's blaming the legislature.

"The basic machine is running the way it’s always run," he said Tuesday.