It was a rough few weeks for Sen. Ron Wyden (AP Photo/J. Scott Applewhite)

Sen. Ron Wyden has so many knives in his back, it’s a wonder he’s still walking around upright. But as his tenure as chairman of the Senate Finance Committee draws to a close, Wyden (D-Ore.) remains relentlessly cheerful.

“I understand how sharp the elbows are and how easy it is for negatives to get on out there,” Wyden said. “But when people tote up whatever it is we’ve accomplished over the past nine months, I hope what they say is we came to play.”

Play, yes. Win, not so much. Since he claimed the gavel from Montana Democrat Max Baucus in February, Wyden has struggled on the most important issues, failing to pass his plans to fix the highway trust fund and the Medicare pay schedule for doctors — in the latter case, after vowing to “pull all the stops out” to get it done.

His latest defeat has unspooled over the past month like a slow-motion car wreck. Since setting out to negotiate the revival of more than 50 expired tax breaks through the end of 2015, a relatively modest goal, Wyden has been shoved aside by his majority leader, snubbed by his House counterpart and handcuffed by his president.

In a final insult, House tax writers torpedoed one of Wyden’s favorite tax breaks, a credit for the purchase of electric motorcycles that helps an Oregon company. This week, the Senate is expected to approve a House bill Wyden strongly opposes that would extend the other expired tax breaks for just a few more weeks.

The shabby treatment has stunned congressional insiders. The Finance Committee chairman is a congressional colossus with vast jurisdiction that spans the entire tax code and roughly half the federal budget. Though Wyden’s chairmanship is temporary — he must give up the gavel to Republican Orrin G. Hatch (Utah) in January — he will remain the senior Democrat on the panel at a time when policymakers are pressing for far-reaching tax reform.

“No majority leader in my era would have thought to attempt to go around the committee and negotiate over the head of the committee chair. You could not get away with it,” said Bob Packwood, the Oregon Republican who led the Finance Committee until 1995, shortly before Wyden replaced him in the U.S. Senate.

“It’s not Ron’s fault,” Packwood added, chalking Wyden’s troubles up to a new era when congressional leaders — not committee chairmen — run the show. That, plus four years of partisan gridlock on Capitol Hill, as well as a toxic round of finger-pointing between the White House and congressional Democrats over their battering in the November election.

Hatch called Wyden "a person of great passion and intellectual curiosity who's always willing to stand up for what he believes is right." But "it's always tough to take over a major committee like this and have everything be hunky dory, especially in a year when Republicans and Democrats are at each other’s throats,” Hatch said. “I think he could have done more if he'd had more support from his own party."

An ideas guy who is forever drafting ambitious bipartisan legislation, Wyden, 65, has deep knowledge of the policy nuts and bolts of overhauling the tax code, fixing Medicare, reining in the CIA’s interrogation tactics and regulating the Internet. In 2011, he released a paper on Medicare reform with Rep. Paul Ryan (R-Wis.), even as Democratic leaders were eviscerating Ryan’s original Medicare proposal.

But Wyden has never run a committee as important as Finance, and tax aides in both parties say his transition from big thinker to powerbroker has been rocky.

“He’s never done anything like this before,” said Jim Manley, a former aide to Reid. “He’s prone to quixotic causes and never really got into the nitty-gritty of the legislative process.”

In an interview, Wyden defended his performance, noting that several Finance bills have become law, including one aimed at fighting child sex trafficking. But he also readily acknowledged the slights he has suffered over the tax bill, primarily at the hands of fellow Democrats.

Wyden said he was blindsided, for example, when Senate Majority Leader Harry Reid (D-Nev.) commandeered negotiations with House Ways and Means Committee chairman Dave Camp (R-Mich.) the weekend before Thanksgiving, and secretly sought to strike a big tax deal worth more than $400 billion over 10 years. (Given his frosty relations with Obama, Reid didn’t notify the White House, either, leadership aides said.)

On Monday morning, Wyden returned to Washington to find “my phone ringing off the hook about rumors about deals . . . I said, I haven’t seen it. I’m the chairman of the Finance Committee. Is there a piece of paper here?”

Wyden said he let Reid know he couldn’t support the rumored package, which included permanent tax breaks for businesses, students, commuters and residents of states without income taxes (such as Nevada) — but no permanent benefits for low-income working families, Obama’s top priority.

On Tuesday afternoon, Wyden said the president called from Air Force One to say he was issuing a veto threat. Wyden’s staff director, Joshua Sheinkman, promptly ran to the first floor of the Capitol where aides to Reid and Camp were waiting to meet and announced the president’s opposition.

Furious, Camp’s team said they would advance a fallback proposal that would revive the expired breaks only until Dec. 31, when they would promptly expire again. Equally furious, Reid’s team indicated they would accept such a bill.

That left Wyden scrambling to revive his plan to extend the breaks through 2015. That measure had been unanimously approved by Wyden’s committee, and he did not want their work to go to waste.

Camp’s team, however, refused to consider new offers unless Wyden cleared them with the White House first. So Wyden’s team spent much of the Thanksgiving break trying to please Obama.

A package that included permanent expansion of the Earned Income Tax Credit and the corporate research credit got the nod from the White House, Wyden said, but Camp rejected it. Wyden wanted to try again, offering to drop the EITC and add breaks for charitable donations of food, cash and land. Administration officials said no, and the House approved the fallback bill.

“The White House wanted it both ways,” Wyden said, briefly sounding aggrieved.

Asked if he was angry about the episode, Wyden said no. “What I do, rather than complain or criticize, is just keep coming back. Not give up and complain and throw rotten fruit at each other. Just keep coming back.”

This week, as lawmakers rushed to leave town for the year, Wyden was good to his word, pressing Reid to replace the House bill with his measure — an effort tax aides in both parties dismissed as futile.

Meanwhile, Wyden on Tuesday suddenly vowed to pass a separate measure to make the charitable breaks, at least, permanent. “It goes to the White House for signature,” he told reporters.

By the end of the day, the White House had crushed Wyden’s hopes there as well. The bill, a spokesman told reporters, looked a lot like something “the president’s senior advisers have recommended that he veto.”