Mitt Romney was all smiles as he introduced an ebullient Rep. Paul D. Ryan to the nation as his Republican vice presidential choice on a sunny Saturday in Norfolk in the summer of 2012.

“I did not make a mistake with this guy,” Romney boasted, as Ryan proclaimed himself “deeply honored and excited.” The crowd cheered.

At that moment, the fresh-faced Wisconsin congressman embodied the ideals and aspirations of a Republican Party stirred by his bold proposals about adhering to fiscal discipline while presenting a welcoming face to immigrants and to the world.

Six years later, Ryan is leaving a far different Republican Party, with much of his own promise unrealized. As he prepares to retire after 2 1/ years as House speaker, he leaves behind a legacy of dramatically expanded government spending and immense deficits, a GOP president unchecked, a broken immigration system, and a party that’s fast abandoning the free-trade principles that he himself championed.

In many ways, the results are the opposite of the vision Ryan advanced during his tenure as speaker and as Romney’s running mate. And the problems may be as big or bigger than they were when Ryan won the speaker’s gavel in the fall of 2015, declaring, “The House is broken. We are not solving problems. We are adding to them.”

It’s a mixed legacy for a lawmaker who joined Congress as a young and idealistic policy wonk two decades ago and reached the greatest heights Capitol Hill has to offer, yet failed repeatedly to bring his ideas to fruition or turn his rhetoric into reality.

Announcing his plans to retire at the end of the year, Ryan said Wednesday that his signature achievements will stand as the GOP’s new $1.4 trillion tax cut law and an increase in military spending that came as part of last month’s $1.3 trillion government-wide spending bill signed by a reluctant President Trump.

“These I see as lasting victories that will make this country more prosperous and more secure for decades to come,” Ryan said.

But both measures came at a steep cost, contributing mightily to a mushrooming deficit that the Congressional Budget Office projected this week will reach $1 trillion in 2020 and exceed that mark in perpetuity. Ryan has sounded the alarm about the nation’s deficit and debt for years but leaves the situation worse than he found it, despite proposing budgets over the years that slashed spending and transformed Medicare into a voucher program for younger Americans.

None of those proposals became law, and Trump has taken Medicare cuts off the table.

Ryan also presided over a dysfunctional House Intelligence Committee investigation into Russia’s role in the 2016 election and alleged collusion between Trump associates and Russian officials. Ryan has frequently provided political cover for Intelligence Committee Chairman Devin Nunes (R-Calif.), seemingly giving Nunes wide latitude to steer the panel through more controversial areas of an investigation that ultimately splintered the once-bipartisan panel.

He came under frequent fire from Democrats for not doing more to rein in Nunes, whom many saw as the chief destabilizing force behind the scenes of the panel’s Russia investigation.

Ryan initially rebuffed Trump when the New Yorker was poised to grab the GOP presidential nomination in 2016. But with Trump in the White House, the two men forged a relationship that was friendly, if occasionally uneasy, and Ryan did little to check the president or encourage oversight of his administration.

“Paul Ryan was the hope of the GOP, but he wilted when his leadership was needed most. Instead of checking Trump, he helped normalize him. Now, metastasized Trumpism in the base and broad American opposition to it are forcing him out. Other leaders should learn from this,” tweeted Evan McMullin, the independent who ran against Trump in 2016.

Ryan has consistently backed special counsel Robert S. Mueller III’s probe but has been frequently criticized for saying too little when it came to Trump’s unorthodox statements and actions related to Russia. He defended Trump’s decision to fire FBI Director James B. Comey, and in more recent months he has repeatedly said he does not believe Trump will move to fire Mueller. He has given no indication that he is at all interested in taking legislative steps to protect the special counsel from being removed.

“When it was time to stand up and say, ‘Hey we can’t do things that way,’ or ‘This doesn’t make sense’, he never did that,” said Tim Smeeding, a public affairs and economics professor at the University of Wisconsin at Madison.

Fiscal issues have long been Ryan’s focus, as chairman of the Budget Committee and then the Ways and Means Committee, and it’s there that his failure to deliver looks most glaring, given years of promises and budget proposals aimed at slashing spending and reining in entitlements.

Ryan acknowledged Wednesday that “more work needs to be done. And it really is entitlements.” But he added that he was proud that the House had passed what he described as “the biggest entitlement reform bill ever considered in the House of Representatives,” a reference to legislation repealing the Affordable Care Act and remaking the Medicaid program. That bill was rejected by the Senate.

Nonetheless, Ryan said he believed he’s had success in “normalizing entitlement reform,” and allies praised him for doing so.

“He’s been working on fundamental tax reform for 20 years, and now he’s gotten it done. He’s been working on entitlement reform. It may not happen on his watch, but they were working on Obamacare before Obama was even born,” said House Financial Services Committee Chairman Jeb Hensarling (R-Tex.). “Some of these ideas will be achieved in one Congress; some will take many congresses. But he was the one who really showed the way.”

In the short term, though, Ryan leaves behind a record of rising spending and a sharply expanded deficit. When he took office in 1999, the government enjoyed a surplus. Now it’s facing trillion-dollar deficits.

Based on some measures, the government already has more than $20 trillion in debt, and it must make large interest payments to continue borrowing. This is expected to eventually overwhelm the federal budget, particularly if interest rates rise. But Ryan’s obsession with these issues was no longer shared by other conservative leaders, particularly after President Barack Obama was no longer in office.

Trump, during the 2016 campaign, promised voters that he wouldn’t touch Medicare, Social Security or Medicaid if he became president, effectively undermining Ryan’s long-held goals. Since taking office, Trump has agreed to try to cut spending on Medicaid and Social Security disability, but even those efforts have failed in a divided Congress.

“He certainly tried to do entitlement reform,” said Rep. James Comer (R-Ky.). “Unfortunately, it wasn’t a priority for a lot of other people in Congress. And, you know, there’s only so much you can do. The majority rules in the House, and the supermajority rules in the Senate. Unfortunately, the votes weren’t there, but I think he’s really done a good job educating the public on it.”

In 2012, Romney catapulted Ryan onto the national stage and brought a flood of scrutiny to his provocative positions on entitlements and fiscal policy.

To Romney, Ryan was exactly the kind of person he would have hired in the private sector, former aides said. He was young, ambitious and wonky — and unafraid to take politically risky positions.

“Paul Ryan was a rising star in the party. He was someone who had established himself as one of the ideas people in the party,” said Ryan Williams, a communications strategist on Romney’s campaign. Ryan “dared to propose ideas that could possibly create a backlash,” Williams added.

If many of those ideas never made it into law, allies credited Ryan with advancing the debate.

Retired senator Alan Simpson (R-Wyo.), who worked closely with Ryan during a massive but ultimately failed 2010 effort to reduce the deficit, described the Wisconsin lawmaker as a “wonderful guy, and he’s a very sensitive, special man.” He said Ryan’s Republican colleagues never rallied to his side when it came time to take tough votes on addressing the government’s most costly programs, such as Medicare, Medicaid and Social Security.

“Once he mentioned those things, they were after his [posterior]. He could never get anywhere because he would mention the curse word of doing something on entitlements,” Simpson said.

Ryan’s record is mixed on other issues, too. Before becoming speaker, he pushed for action on comprehensive immigration reform, even joining outspoken immigration advocate Rep. Luis V. Gutiérrez (D-Ill.) at a joint forum to voice his support. But he became speaker partly by promising not to advance immigration legislation that didn’t enjoy majority support in the GOP conference, and despite much discussion, especially after Trump threatened protections for young undocumented immigrants who arrived in the United States as children, nothing ever happened.

Ryan also spent time focused on poverty issues, traveling with Robert L. Woodson, a former civil rights activist who founded a center aimed at transforming troubled communities. But Rep. Emanuel Cleaver II (D-Mo.) said that as much as he’d like to believe Ryan was sincere, he couldn’t point to anything concrete Ryan had achieved on behalf of communities of color.

“Maybe in this super-tribal atmosphere in which we find ourselves, the speaker just couldn’t do it,” Cleaver said. “I don’t know.”

In the end, critics noted that for all Ryan’s talk over the years, his record of accomplishments on the issues he discussed most often ended up being thin.

“I think his legacy on fiscal policy, on poverty policy, on entitlements is an extremely negative one,” said Jared Bernstein, former chief economist to Vice President Joe Biden. “And the best I can say about him is up until this big tax cut, he’s been pretty feckless in terms of actually legislating.”

Damian Paletta, Karoun Demirjian, Sean Sullivan and Mike DeBonis contributed to this report.