Rep. Ryan Costello (R., Pa.) didn't try to be diplomatic when he announced over the weekend he would be retiring from Congress after just two terms: President Trump was a major factor.

"Whether it's Stormy Daniels," he told the West Chester Daily Local News on Sunday, "or passing an omnibus spending bill that the president threatens to veto after promising to sign, it's very difficult to move forward in a constructive way today."

To hear this GOP congressman heading for the exit tell it, Trump is standing in the way of Republicans getting anything done. And there are plenty of other Republicans who will agree with Costello behind closed doors.

Such is the cruel reality for Republicans. They control Washington for the first time in a decade, in large part thanks to Trump's winning the White House when no one expected him to. And now they are at risk of losing their congressional majorities in large part thanks to Trump's distractions, vacillations, unpredictability, and unpopularity.

Republicans in Congress are retiring in historic numbers this year. Nearly 50 Republicans in the House and Senate have announced they are retiring, and 25 of those are retiring outright or have already left office, compared with just 10 House Democrats.

Republicans haven't had that many retirements since before the 1930s, which is as far back as data from Brookings Vital Statistics on Congress goes. Retirements are a big reason Democrats are positioned to try to take back control of the House for the first time in eight years. In our rankings of the top 10 House races most likely to flip parties, five are Republican seats made more competitive by lawmakers' decision to retire.

Those who didn't blame Trump blamed the dysfunction in Congress for their decision to leave, though these days, it's hard to separate the two.

The government has shut down twice in 2018, and it almost shut down for a third time when Trump threatened to veto a spending bill that Republicans heaved through Congress to keep the government open. (That's the omnibus spending bill Costello mentioned in his retirement remarks.) There is a strong case to make that Trump's severe indecision on whether he wanted to protect "Dreamers" was why the government shut down the first time in January.

Costello was one of the most blunt, but he's not the only Republican retiring from Congress to point the finger at Trump for the decision to leave politics. Sen. Jeff Flake (R., Ariz.) made his whole retirement speech about Trump, specifically the damage he feels the president is inflicting not just on his party but on democracy. "There are times when we must risk our careers in favor of our principles," he said on the Senate floor. "Now is such a time."

"The president was a factor," retiring Rep. Charlie Dent (R., Pa.) told CNN in December on his decision not to run for a eighth term. Dent has been an outspoken critic of the president, someone the press corps relied on to publicly say what many of his colleagues were privately thinking. Like Costello, Dent also cited the budget dramas that have whipped Congress from crisis to crisis. (And when Dent had decided to retire in September, the government hadn't even shut down for the first time.)

Even those who haven't explicitly said they are leaving because of Trump are arguably leaving in part because of Trump. The president's unpopularity in places like California, Washington statem and Virginia very likely factored into vulnerable Republicans' decision to step down rather than run for reelections they might not win.

In California, powerful Republican Reps. Darrell Issa and Edward R. Royce decided to retire rather than wage an expensive reelection campaign in districts Hillary Clinton won in 2016. Rep. Dave Reichert of Washington is another Republican representing a Clinton district who decided to retire instead. And after Virginia voters repudiated Republicans in state elections in 2017, keeping the governor's mansion in Democratic hands and nearly kicking Republicans out of their state House majority, Rep. Bob Goodlatte announced his retirement.

To bring this back to Costello, it's not a coincidence that he decided to retire after a Democrat clinched a special election across the state that went for Trump by 20 points. In this political environment, figure Costello and a historic number of Republicans, better to be out than stay in and live through more frustration, unpredictability, scandal — and likely election losses as a result.

Amber Phillips writes about politics for the Washington Post. @byamberphillips