These lucky renters are riding the money train.

Tenants who signed leases in sweetheart deals in North Brooklyn amid the looming threat of an L train shutdown saved a staggering $26.5 million – and will come out as the “biggest winners,” thanks to Gov. Andrew Cuomo’s 11th-hour plan calling off the closure.

According to newly released data from StreetEasy, there were roughly 20,000 homes for rent listed on the real estate website in the area last year.

Renters who signed leases in Bushwick, Williamsburg and Greenpoint — and would have been affected by the dreaded L train closure — saved an estimated minimum of $6.4 million “compared to what they’d have paid if there were no shutdown and rents had remained flat,” according to the report published Tuesday.

“If we assume rents in Williamsburg would have grown at the same rate as the rest of Brooklyn — 3.3 percent cumulatively since April 2016 — total renter savings rises to $26.5 million,” StreetEasy senior economist Grant Long wrote in the report.

Long added: “Moreover, the full amount of savings among those renters renewing leases, signing leases longer than 12 months, negotiating onsite, and living in other adjacent areas dependent on the L train is likely larger than even the $26.5 million figure.”

Rents in North Brooklyn plummeted a cumulative 1.5 percent since the L train shutdown was first announced back in April 2016, while rents boroughwide have risen, according to StreetEasy.

Many living in the area rejoiced after Cuomo announced last week – less than four months before the slated 15-month closure — that the shutdown of the railway linking Brooklyn and Manhattan will not happen.

Instead of a shutdown, L trains will run in 20-minute intervals on nights and weekends as extensive repairs are made to the line’s decrepit Canarsie Tunnel, which runs under the East River and was flooded during Hurricane Sandy in 2012.

“If the MTA follows through on Gov. Andrew Cuomo’s new proposal to avert the long-dreaded L train shutdown, renters who signed leases in the affected area over the last year will be the biggest winners,” Long wrote in the report.

The report predicts that rents in the North Brooklyn area will waste no time shooting back up.

“Landlords will be anxious to make up for lost revenues, and are likely to take a harder stance in negotiations despite whatever bargaining chip the lingering uncertainties over the L give renters,” Long wrote. “We expect rents to rise sharply over the next few weeks as they climb back toward pre-shutdown levels.”