Republican Sen. Orrin Hatch of Utah said Tuesday he will not seek re-election after serving more than 40 years in the Senate, opening the door for 2012 GOP presidential nominee Mitt Romney to run for his seat.

The 83-year-old Hatch, the longest-serving Republican in the Senate, opted for retirement despite a full-court press from President Donald Trump to stay in Washington, particularly as Romney's ambition for the seat became apparent.

Romney was a vocal critic of Trump's during the 2016 election and could be a potential thorn in the president's side in the Senate. He also has drawn the ire of Trump's former White House adviser, Steve Bannon, who recently derided Romney as a draft dodger who "hid behind" his Mormon religion to avoid serving in the Vietnam War.

Hatch said he decided to retire at the end of his seventh term after "much prayer and discussion with family and friends" over the holiday break. He said he's always been a fighter, "but every good fighter knows when to hang up the gloves."

"Only in a nation like ours could someone like me — the scrappy son of a simple carpenter — grow up to become a United States Senator," he added.

Trump had been open in recent months about pressuring Hatch to stay in the Senate, and his private lobbying campaign was bolstered by a public love fest, with Trump inviting Hatch with him on Air Force One in December when he shrunk the boundaries of two Utah monuments.

"Congratulations to Senator Orrin Hatch on an absolutely incredible career. He has been a tremendous supporter, and I will never forget the (beyond kind) statements he has made about me as President," Trump tweeted Tuesday. "He is my friend and he will be greatly missed in the U.S. Senate!"

Hatch chairs the powerful Senate Finance Committee and was a major force in getting a tax overhaul through Congress and signed into law in December. He also played a key role in persuading Trump to sign proclamations scaling back the two Utah monuments that Hatch and other conservatives considered examples of government overreach.

Romney, the former Massachusetts governor who now lives in Utah, thanked Hatch in a statement on Facebook and said Hatch "has represented the interests of Utah with distinction and honor."

Romney's statement did not mention his own plans.

If he ran, Romney would enter the Senate race as the heavy favorite, having carried Utah in 2012 by a margin of nearly 3-to-1 over Democrat Barack Obama. Romney would likely be among a small number of influential Republicans willing to take on Trump.

He was an early critic of the billionaire businessman, labeling Trump "a phony, a fraud. His promises are as worthless as a degree from Trump University," Romney warned in 2016 in a speech in Utah.

After the election, Romney submitted himself as a candidate to be secretary of state in an excruciatingly public interview process. But since Trump has moved into the White House, Romney has been a frequent detractor, particularly after Trump equivocated on condemning white supremacists in Charlottesville last summer.

White House press secretary Sarah Huckabee Sanders said Tuesday she had not discussed Romney's potential candidacy with Trump and could not say whether the president would support him.

Amid earlier speculation about Hatch's plans, the Utah senator stepped up to defend Romney, a fellow Mormon, against criticism from Bannon.

At a rally for Alabama Senate candidate Roy Moore, Bannon called Romney a draft dodger who "hid behind" his religion. Romney received a draft deferment for missionary work in France during Vietnam.

Hatch called Bannon's attack "disappointing and unjustified" and said Romney "has sought every opportunity" to serve the country.

Late last year, Hatch also found himself in a heated debate with Democratic Sen. Sherrod Brown of Ohio. The dispute occurred as Republicans pushed a near $1.5 trillion, 10-year tax cut for businesses and individuals through the Senate Finance Committee over Democrats' objections.

Brown, a liberal firebrand, said people know Republicans want to help the rich because it's "in their DNA."

Hatch told Brown he'd heard enough, adding that he's helped disadvantaged people "my whole stinking career." As the two senators talked over each other, Hatch said he was tired of Democrats' "bull crap."

In the statement announcing his decision to retire, Hatch cited work helping create the Americans with Disabilities Act, expanding children's health insurance and expanding use of generic drugs.

Hatch also served as chairman of the Senate Judiciary Committee and was at the center of many of the biggest confirmation battles. During his time on the committee, the Senate has confirmed nearly 1,900 federal judges.

In 2000, Hatch sought the Republican nomination for president, saying he had more experience in Washington than his opponents and insisting he could work with Democrats. He withdrew after only winning 1 percent of the vote in the Iowa caucuses.

Hatch frequently wrote religious songs and recorded music in his spare time as a way to relax. One of his songs, "Unspoken," went platinum after appearing on "WOW Hits 2005," a compilation of Christian pop music.

___

Associated Press writers Zeke Miller, Steve Peoples, Thomas Beaumont and Michelle Price contributed to this report.