New York Gov. Andrew Cuomo and New York City Mayor Bill de Blasio announced on Tuesday a plan they said would transform the state's transportation system using funds drawn from a proposed tax on cannabis and so-called "congestion pricing" tolls extracted from commuters driving into the city.

The plan will also make use of new taxes on online sales made legal by a landmark Supreme Court ruling last year, the two Democrats said in a joint statement that laid out a 10-point plan to fix the city's subway system.

The development marks a rare showing of unity between the notorious political rivals on an issue central to the infrastructure of America's most populous city. This includes notable movement on the contentious issue of congestion pricing, which Cuomo has said could raise $15 billion. The issue has divided the two men, with Cuomo in favor and de Blasio generally in opposition.

But the two managed to reach an agreement, saying that the funds from the tolls and the two taxes would be placed in a "lockbox" to fund the Metropolitan Transportation Authority — a condition that de Blasio had previously established. The MTA, which runs America's largest transportation network, has been dogged by criticism in recent years as problems with slowing trains and damaged equipment mounted.

The MTA has estimated it needs $40 billion to repair its subway and bus systems.

de Blasio tweet

Cuomo and de Blasio said funding priority would go to the "subway system, new signaling, new subway cars, track and car repair, accessibility, buses and bus system improvements and further investments in expanding transit availability to areas in the outer boroughs that have limited mass transit options."

Of the three proposed funding sources, only the online sales tax is already in effect. That tax, on large online vendors registered outside of New York, automatically went into effect after the nation's top court eliminated a prohibition on such laws in June, according to the New York Department of Taxation and Finance.

Meanwhile, Cuomo outlined a tax on cannabis in his State of the State address last month. The longtime foe of legal marijuana changed his tune last year, amid a contentious primary battle with progressive primary challenger Cynthia Nixon and new data showing that taxes on the agricultural product could produce substantial revenue.

Cuomo anticipates his marijuana tax plan will rake in $300 million when fully phased in.

Cuomo tweet

An energized Democratic state legislature is expected to take up the proposal later this year. Other states have put forward similar plans. Michigan, for instance, will channel 70 percent of its taxes on marijuana sales to infrastructure and schools, starting in October.

The congestion pricing scheme will involve electronic tolling devices in New York's neighborhoods most affected by commuter traffic. It's a plan that has long been supported by advocates for reducing the traffic in New York's clogged streets.

De Blasio's opposition to congestion pricing rested on the claim that it would disproportionately harm the poor, though that conclusion has been challenged by advocacy groups, who say the poorest New Yorkers are likely to be the prime beneficiaries.

The congestion pricing scheme is not a lock, even with Cuomo and de Blasio on board. The plan will still head to Albany for approval from the state legislature, where lawmakers remain divided, according to local media.