If the history of the MTA subway system is any lesson, it’s no time to cut transit funding.

A new report from New York University’s Rudin Center chronicling in detail the last 40 years of MTA subway ridership outlines how an injection of funds, technological advancements and more aggressive policing measures helped turn the MTA from a crime-ridden failure to a daily necessity for New Yorkers.

Despite record ridership levels taxing the system, it took about a year for the city and state to agree on funding for the agency’s current, $29.5 billion five-year spending outline, known as the capital plan, which many experts believe was too small to begin with.

More recently, budget proposals on both the federal and state levels have threatened the MTA’s financial support.

“The agency is in a tough position because they do not receive the funding that they need to keep the system running at the optimal level, but at the same time they have to raise the fare, making them look bad to New Yorkers,” said Sarah Kaufman, assistant director for technology programming at Rudin and a co-author of the report, published Tuesday. “If we had more capital investment we could have a more modern and reliable system.”

That’s evidenced by ridership trends over the last four decades. A $7.6 billion investment in equipment, improved maintenance and graffiti removal in 1982 was then complemented with an increase in annual ridership of 8 percent by 1994, when the MTA first eclipsed a billion yearly riders.

In 1998, the introduction of the MetroCard changed how New Yorkers moved through the city. The technology brought weekly and monthly cards and also free transfers.

“Before the MetroCard, people would refer to certain neighborhoods as ‘two-fare zones.’ Because they had to pay often for the bus and subway and the transfer, it was just financially not feasible” to live there, Kaufman said. “But with the advent of the MetroCard … it was a boon for the outer borough neighborhoods.”

A year after the MetroCard was phased in, subway ridership in the Bronx and Brooklyn increased by 16 percent and 17 percent, respectively. The flimsy yellow fare card fueled what Kaufman described as the “profound” growth of subway ridership along the L line, fostering the dramatic changes in neighborhoods like Williamsburg and Bushwick.

In 2016, subway ridership declined for the first time since 2009, thanks to a slight drop in weekend ridership. Kaufman said it was impossible to identify one reason for the dip, but said that surging delays due to overcrowding likely played a part — a symptom of chronic underfunding.

“It’s extremely important that the subway system is well-funded both for daily operations and capital improvements. There are still parts of the subway using 100-year-old signal technology,” Kaufman said.

Facing a capacity crunch from New York’s surging population and tourism rates, the Trump administration’s budget proposal is threatening to gut funding streams for transit infrastructure, which could have implications for MTA capital projects like the next leg of the Second Avenue subway.

Gov. Andrew Cuomo had called the budget a “wrecking ball” for transit infrastructure in the metropolitan area.

Veronique Hakim, the acting executive director of the MTA, said she visited Washington, D.C., last week to “begin the conversation” with federal officials over transit funding.

“We were able to begin the conversation about conveying the importance of our projects and our programs and what we’re relying on in terms of federal funding,” Hakim said.

Subway station with the largest ridership increase:

Roosevelt Avenue-74th Street, Queens

1975 total riders: 6.8 million

2015 total riders: 17.22 million

Change: 152 percent

Subway station with the largest ridership decrease:

Broad Street, Manhattan

1975 total riders: 5.37 million

2015 total riders: 1.83 million

Change: -65.9 percent