Updated

House Speaker Paul Ryan, R-Wis., announced Wednesday that he is not seeking re-election in November -- a move that ends a nearly two decade career in Congress and comes as the GOP girds for a tough fight to keep control of the House this year.

Ryan said in a press conference after meeting with House lawmakers that his primary motivation was so he could spend more time with his wife and children, who he said he did not want to remember him as a “weekend Dad.”

“If I am here for one more term, my kids will only ever have known me as a weekend Dad -- I just can’t let that happen,” he said.

Ryan, who was first elected to Congress in 1998, said he believes Congress has achieved “a heck of a lot” under his leadership as speaker since 2015.

“You all know I did not seek this job, I took it reluctantly, but I have given this job everything I have,” Ryan said, adding that he has “no regrets.”

His decision not to seek re-election follow him playing a key role in passing last year's tax reform bill -- an issue close to his heart and something he said he has dedicated his career to. But Ryan has had a rocky relationship with President Trump, and condemned Trump's more controversial moves on a number of occasions during the campaign.

Axios reported that Ryan’s decision was motivated partly by Trump, who has reportedly made the job frustrating for Ryan.

Last month, Trump slammed Congress over the $1.3 trillion spending bill, which Ryan played a key role in crafting, over its failure to include funding for Trump’s border wall and a fix for the Obama-era Deferred Action for Childhood Arrivals Program (DACA).

But the two had found common cause on health care, tax reform, and increasing funding for the military -- the latter was hailed by both as a big win in the omnibus. On Wednesday, Ryan said that increasing defense spending and the reform of the tax code were his two biggest achievements.

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

Earlier Wednesday, Trump tweeted that Ryan leaves "a legacy of achievement that nobody can question."

Ryan in turn said in an interview on Fox News' "The Daily Briefing" that he and the president had developed a good relationship.

"We've spent a great deal of time with each other -- I’m having dinner with him tonight," he told Fox News' Dana Perino. "We speak on the phone constantly so honestly, we've just developed a good friendship, developed a good rapport. He is the one who gave us with his victory the ability to all this work done, so I’m very excited about that."

His counterpart in the Senate, Majority Leader Mitch McConnell, R-Ky., said Ryan's legacy would be that of a “transformational conservative leader,” citing tax reform and securing increased funding for the military.

“The results have been beyond impressive,” McConnell said in a statement. “Capping off a remarkable twenty-year career in Congress, Paul’s speakership has yielded one signature accomplishment after another for his conference, his constituents in his beloved home state of Wisconsin, and the American people.”

House Minority Leader Nancy Pelosi, D-Calif., called Ryan an "avid advocate for his point of view and for the people of his district."

“Despite our differences, I commend his steadfast commitment to our country," Pelosi said in a statement. "During his final months, Democrats are hopeful that he joins us to work constructively to advance better futures for all Americans."

The Democratic Congressional Campaign Committee (DCCC) said that Ryan’s retirement was a sign of defeat for Republicans in November.

“Speaker Ryan sees what is coming in November, and is calling it quits rather than standing behind a House Republican agenda to increase healthcare costs for middle class families while slashing Social Security and Medicare to pay for his handouts to the richest and largest corporations,” spokesman Tyler Law said in a statement.

“Unfortunately, for the many vulnerable House Republicans that Paul Ryan is abandoning, his historically unpopular and failed policies will hang over their reelections like a dark cloud,” he added.

Ryan ran as 2012 GOP presidential nominee Mitt Romney’s running mate, and has gained a reputation over the years as a wonkish figure with a focus on limited government and balanced budgets. He also played a central role in the push to repeal-and-replace ObamaCare, passing numerous bills to defund and replace the controversial 2010 law. The most significant effort to repeal the law fell short in the Senate last summer.

Ryan’s decision comes ahead of a tough midterm election cycle for House Republicans, who are expected to struggle to keep control of the chamber in the face of an enthused Democratic opposition. Polls suggest Democrats are likely to pick up the gavel.

Ryan said that the midterms were not a factor in his thinking, but one GOP insider told Axios that his move was a "tectonic" shift ahead of November

“This is going to make every Republican donor believe the House can’t be held," the Republican said.

But, Ryan said on "The Daily Briefing" that he didn't think his announcement would affect GOP performance in the midterms.

"I don’t think anybody's election is going to hinge on if Paul Ryan is Speaker of the House," he said.

The move also ignites the race to potentially succeed Ryan should Republicans hold the House in November. House Majority Whip Steve Scalise, R-La., and GOP Majority Leader Kevin McCarthy, R-Calif are both mentioned as possibilities.

Ryan was not believed to be endangered electorally, but he is in a district that favors Republicans by five points in a swing state.

Fox News' John Roberts, Chad Pergram and Fox Business' Bruce Becker contributed to this report.