WASHINGTON—Utah Sen. Orrin Hatch said on Tuesday he would retire when his current term ends next year, opening the door for a possible political comeback by 2012 Republican presidential nominee Mitt Romney.

Mr. Hatch, 83 years old and the longest-serving Republican senator, had been urged by President Donald Trump to run for re-election to an eighth term in 2018. But voters and political forces in Utah, including the state’s largest newspaper, have pressed him to retire.

“Every good fighter knows when to hang up the gloves,” Mr. Hatch said in a statement. “And for me, that time is soon approaching. That’s why, after much prayer and discussion with family and friends, I’ve decided to retire at the end of this term.”

Mr. Hatch, who was first elected to the Senate in 1976 and is chairman of the tax-writing Finance Committee, announced his decision soon after accomplishing one of the pinnacle achievements of his career, helping shepherd through Congress a $1.5 trillion tax cut, which Mr. Trump signed into law on Dec. 22.

Appearing with the senator last month in Utah, Mr. Trump said he hoped Mr. Hatch would “continue to serve your state and your country in the Senate for a very long time to come.”