WASHINGTON — Veteran senators from both parties yesterday laid out terms that could lead to a compromise on the fiscal cliff.

Republican lawmakers said they’d be willing to consider new taxes if the Democrats back Medicare and Medicaid reform.

Sen. Lindsey Graham (R-SC) told ABC’s “This Week” that “it’s fair to ask my party to put revenue on the table” in order to avoid automatic tax hikes and across-the-board spending.

He added that he would be “willing to generate revenue” by capping tax deductions, a move, he said, that would most impact upper-income Americans.

That’s part of a larger Republican backlash against an anti-tax pledge signed by hundreds of GOP members of Congress over the last two decades.

“When you’re $16 trillion in debt, the only pledge we should be making to each other is to avoid becoming Greece, and Republicans should put revenues on the table,” Graham said.

The no-tax pledge, initiated by Americans for Tax Reform lobbyist Grover Norquist, has been crumbling in the last few days, as Republicans reveal a willingness to compromise on deductions and loopholes.

“A pledge you signed 20 years ago, 18 years ago is for that Congress,” Rep. Peter King (R-LI) said on NBC’s “Meet the Press.”

And Sen. Dick Durbin (D-Ill.) told ABC’s “This Week” that the Democrats should weigh changes to Medicare and Medicaid, a tactic that would buck labor unions’ call for a hands-off policy.

“Those saying, ‘Don’t touch it. Don’t change it,’ are ignoring the obvious,” Durbin said. “We can make meaningful reforms in Medicare and Medicaid without compromising the integrity of the program.”