ALBANY – Gov. Andrew Cuomo and the state Legislature are in crunch time over whether they can strike a deal to legalize recreational marijuana as part of the state budget due Sunday.

And advocates are pressing state leaders to reach an agreement after Cuomo and legislative leaders had pledged support for making pot sales and use legal in New York.

“A failure to legalize marijuana when Democrats control all branches of NY state government is a failure of leadership,” Kassandra Frederique, state director for the Drug Policy Alliance, a pro-marijuana group, said in a statement.

Can marijuana get approved?

Cuomo pledged in his State of the State address in January to include legalized pot in his budget proposal in an effort to make New York the 11th state to allow for recreational sales.

While Democrats who control the state Legislature have largely supported the measure, it has faced obstacles because of the complexity of the issue and concerns from local governments, police and schools over the impact it could have in their communities.

Several county executives, including those on Long Island and in Rockland and Putnam, have already said they would recommend opting out of allowing sales there.

"We are working to try to get marijuana done," Cuomo said Monday on WAMC, a public radio station in Albany.

"It is complex, and it's the devil is in the details. And I don't know that it is done for the budget, but if it's not done after the budget, I believe we get it done after the budget."

More:Recreational marijuana in New York: More counties say they will opt out

More:Legalizing marijuana likely faces setback in New York

If not now, when?

The legislative session runs until mid-June, so lawmakers and Cuomo appear to be moving toward dealing with it after the budget is approved as the time to get a fiscal plan in place gets shorter.

School groups and health officials are pressing them to delay a vote.

"The legalization and commercialization of recreational marijuana creates a serious public and child health threat and sends a harmful mixed message to young people, that using recreational marijuana is acceptable," the state PTA wrote in a letter Tuesday to state leaders.

Marijuana supporters rallied at the Capitol on Tuesday in a last bid to get the proposal included in the budget.

“Governor Cuomo is primarily responsible for stalled negotiations, as he publicly put the brakes on talks for legalizing in the budget only to make contrary statements this week," Frederique continued.

More:New York marijuana: What to know about cannabis edibles, hospitalizations, poison control

More:Marijuana tax, congestion pricing would help fund NYC subways in Cuomo, de Blasio plan

Details of the plan

State leaders have debated how much to tax marijuana if it's legalized, where the revenue would go and how much could be grown and sold.

Legislative leaders have made it clear that they want the majority of the revenue to come back into poor communities of color that have been disproportionally impacted by having marijuana illegal.

But Cuomo recently proposed using some of the money to pay for repairs to the subways and train in the New York City metropolitan area.

Rich Azzopardi, Cuomo's senior advisor, said the governor has worked to get legalized marijuana in New York, citing a study the state did and 17 listening sessions across the state.

The state estimates as much as $300 million a year in revenue when the program is fully implemented, but the proposed budget doesn't yet include any money from legalization.

"As the governor said, we have and will continue to work on this proposal with our partners in the Legislature, but, based on comments from legislative leaders and as a matter of fiscal responsibility, we did not count on revenue in the budget," Azzopardi said.

Other states

Part of the reason New York wants to move on the issue sooner rather than later is because neighboring states have either legalized marijuana or are looking to do so.

Massachusetts and Vermont already have, as well as Canada.

New York and New Jersey are both debating how and when to legalize it, but New Jersey's plan faltered Monday when lawmakers there were unable to get the votes to pass it.

So it appears that in New Jersey the issue may languish until after the November elections when all 80 seats in the Assembly are on the ballot, according to the USA Today Network in New Jersey.

More:New York recreational marijuana: What to know about research gaps, medical opposition

More:Recreational marijuana: What schools fear most about the legalization in New York