Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — Sen. Orrin Hatch, R-Utah, announced Tuesday that he will retire at the end of his term this year, ending months of speculation about the political future of the longest-serving Republican in the Senate.

"Every good fighter knows when to hang up the gloves. And for me that time is soon approaching," Hatch, a former amateur boxer, said in a video posted online. "That's why, after much prayer and discussion with family and friends, I've decided to retire at the end of this term."

An announcement from Senator Orrin G. Hatch. #utpol pic.twitter.com/UeItaLjR3j — Senator Hatch Office (@senorrinhatch) January 2, 2018

His term ends in January 2019.

Hatch, 83, who was elected in 1976, spent much of last year publicly deliberating about whether to stand again for re-election in November.

His departure could clear the way for former GOP presidential nominee Mitt Romney, who is said to be eyeing a bid for the seat, although other Republicans are certain to jump into the fray. Democrats Jenny Wilson and Mitchell Vice have already declared their candidacies.

Romney, an outspoken critic of President Donald Trump, could become a powerful foe of the White House inside the Senate GOP caucus, which will soon lose Trump skeptics Bob Corker of Tennessee and Jeff Flake of Arizona, both of whom are retiring.

"I join the people of Utah in thanking my friend, Senator Orrin Hatch for his more than forty years of service to our great state and nation," Romney said in a short statement on Facebook. "Senator Hatch has represented the interests of Utah with distinction and honor."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The former Massachusetts governor and presidential candidate has a home in Utah and deep ties to the state, including through his Mormon faith.

Utah leans heavily Republican, but has not been friendly to Trump. He came in third in the state's GOP caucuses in 2016. In the general election, more than 20 percent of Utah residents opted to vote for former CIA officer Evan McMullin, who ran as an anti-Trump protest candidate.

Press Secretary Sarah Huckabee Sanders said Tuesday that the White House has not yet decided if it will get involved in the race to replace Hatch, a Trump ally.

"The president certainly has the greatest and deepest amount of respect for Senator Hatch," Sanders said, adding that it was "very sad to see Senator Hatch leave."

Steve Bannon, Trump's former chief strategist who is mounting a campaign against Republican establishment senators, attacked Romney and his children for not serving in the military while campaigning for Roy Moore in Alabama last month.

Praise poured in for Hatch from his colleagues, including fellow Utah Republican Sen. Mike Lee.

Sen. Hatch has been a tremendous servant to the people of Utah and he will be sorely missed. It has truly been an honor serving with him in the United States Senate and I know he will continue to do fantastic work for Utahns. — Mike Lee (@SenMikeLee) January 2, 2018

Hatch, the chairman of the powerful Senate Finance Committee, was instrumental in the passage of the tax overhaul signed into law by Trump late last year.

At a White House ceremony to celebrate the tax plan, Hatch praised Trump for helping to fulfill the senator's dream of overhauling the tax code.

"I have to say that this is one of the great privileges of my life to stand here on the White House lawn with the president of the United States, who I love and appreciate so much," Hatch said.

Raised in what he's called "a ramshackle house" during the Great Depression, Hatch went on to serve as chairmen of three different Senate committees and put his stamp on major pieces of legislation across the policy spectrum.

“Orrin’s long list of accomplishments means he will depart as one of the most productive members ever to serve in this body," Senate Majority Leader Mitch McConnell, R-Ky., said in a statement.

Hatch remains popular in Utah, but voters overwhelmingly wanted him to retire, according to a poll commissioned by The Salt Lake Tribune in October.

Three quarters of Utah residents said they did not want Hatch to run for an eighth term, while nearly half — 44 percent — backed Romney to replace Hatch out of several potential options.

On Christmas, the Tribune ran a front-page editorial praising Hatch's service, but also urging him to "call it a career."