DEVAL PATRICK WAS GOVERNOR the last time the Legislature grappled with providing new funding for transportation, and for him it’s not a pleasant memory.

On the Horse Race podcast from the MassINC Polling Group, which was posted Wednesday night, Patrick talked a lot about his presidential campaign, but he also took a stroll down memory lane when he was asked if he felt he left the MBTA in a good place when he left office in 2015.

“We made historic levels of investment in transportation,” he said, signing contracts for new Red and Orange line cars and pushing South Coast Rail forward. But Patrick said he wanted to do more, and tried twice to raise additional revenue but was shot down both times by the Legislature.

In 2009, Patrick sought a 19-cent increase in the gas tax, a proposal that “went down in flames” in the Legislature, he said. An increase in the state sales tax from 5 percent to 6.25 percent was approved.

In 2013, he began talking with legislative leaders again about new transportation revenues. He said House Speaker Robert DeLeo and then-Senate president Therese Murray told him not to include an increase in the gas tax in the package he was sending the Legislature. “They said the gas tax is off the table. It was just too painful last time so please don’t do that again,” Patrick quoted them as saying.

So Patrick said he put together a detailed spending plan and proposed funding it with a hike in the income tax and a cut in the sales tax. The two measures combined were expected to yield $1.9 billion in revenue for education and transportation.

Patrick said he went out and began selling the funding plan across the state, and the initial reaction was fairly positive. “And then four guys went into the speaker’s office and said we want a gas tax, not this. And that was it,” he said. “I learned about that from an announcement. And I was furious.”

It was unclear from the recording who the “four guys” were.

A spokeswoman for DeLeo had no immediate comment.

Patrick said he calmed down after a senior legislator, now retired, said the legislative leaders never expected him to actually go out and sell the proposal. Patrick said the legislator likened the situation to Dorothy being asked by the Wizard of Oz to bring back the wicked witch’s broom, never expecting her to actually do it.

The roughly $500 million revenue package that eventually emerged from the Legislature raised taxes on cigarettes, software services, and gasoline, and tied future increases in the gas tax to inflation. Patrick vetoed the package and the Legislature overrode his veto. The Legislature subsequently eliminated the software services tax and voters did away with the proposal tying the gas tax to inflation.

Patrick said legislative leaders at the time encouraged him to accept the revenue package and portray it as a victory. “It wasn’t. It was not going to be enough to get the job done and everybody knew it,” Patrick said.

DeLeo, who was at the center of those earlier debates about transportation funding, is taking the lead now among elected officials in pushing for new transportation revenue. Patrick said it’s clear the T needs additional revenue.

“No amount of reorganization is going to deliver a 21st century T,” he said. “It is going to require significant new investment.”

Patrick declined to comment on Gov. Charlie Baker’s handling of the T, but he noted it is his opinion that political capital needs to be spent, not just accumulated, if leaders want to accomplish something.