“Our complex problems are absolutely solvable,” Ryan said at the Library of Congress, across the street from the U.S. Capitol, where he’s served two decades in the House. “That is to say our problems are solvable if our politics will allow it.”

The Wisconsin Republican’s half-hour address, which touted achievements and admits shortcomings, came as he closes his three-year run as speaker. Despite GOP control of the White House and Congress since early 2017, it’s been an unusually tumultuous period dominated by the erratic decision-making and verbal outbursts of President Trump and by Republican divisions over top issues including health care and immigration.

Ryan’s departure comes six weeks after an Election Day that saw Democrats capture House control. Their triumph followed a campaign in which they criticized Republicans for trying to repeal and replace former President Barack Obama’s popular health care law, a primary GOP priority.

Under Ryan, Congress approved the biggest tax cuts in decades, boosted defense spending and rolled back Obama regulations protecting clean air and water. But annual federal deficits are surging, Medicare and other expensive entitlement programs are growing, and their attempt to scuttle Obama’s health care statute crashed.

In Ryan’s waning days as House speaker, Congress was trying to avoid a partial government shutdown as Trump clashes

with Democrats over his demand for taxpayer money to build a border wall with Mexico.

Ryan cited passage of more than 1,000 bills, though most were minor, and predicted that the failed GOP effort to repeal and rewrite Obama’s health care law will be the framework for an ultimate solution.

Ryan, 48, acknowledged never achieving two longtime dreams — reining in spending by the government’s huge entitlement programs and controlling the enormous and growing national debt. Thanks partly to the 10-year, $1.5 trillion tax cut Republicans enacted last year, the nonpartisan Congressional Budget Office estimates a record $12.4 trillion accumulated federal deficit for the coming decade.

“I acknowledge plainly that my ambitions for entitlement reform have outpaced the political reality, and I consider this our greatest unfinished business,” he said.

Ryan was elected to Congress in 1998 and became a leader of Republicans trying to shrink government. As House Budget Committee chairman, he wrote spending plans that envisioned squeezing savings from popular benefit programs like Medicare and eliminating deficits — cuts Congress never actually enacted.

He was Mitt Romney’s vice presidential running mate in 2012 and became speaker in 2015.