PHOENIX — Rep. Ruben Gallego said Monday he won't run for the U.S. Senate, likely avoiding a contentious fight for the Democratic nomination to finish John McCain's last term.

Gallego is well-connected to the liberal base of the Democratic Party, and many activists hoped the Phoenix Democrat would provide an option to the left of Mark Kelly, a retired astronaut who has run a centrist campaign since he jumped into the race last month.

RELATED: Retired astronaut Mark Kelly announces 2020 bid for US Senate in Arizona

But Gallego said he doesn't want to engage in a bitter primary before pivoting to the general election for a seat that's crucial for Democrats eyeing the Senate majority.

"Republicans want a bitter primary between Democrats so they can hold this seat," Gallego told reporters in Washington. "And you know what, if they want that, they're going to have to find another race."

Arizona has long been a Republican stronghold, but Democrats made big inroads in 2018 and see the state as potentially competitive in next year's presidential election.

PREVIOUS: Kyrsten Sinema, Martha McSally sworn in as US senators

Republicans hoped a Gallego run would pull both candidates to the left and alienate voters with months of negative campaigning that would allow GOP Sen. Martha McSally to focus on the general election. McSally was appointed to the seat and took office in January.

READ: Arizona's new senators close on many votes but miles apart on big ones

Gallego said most of the pressure not to run came from Arizona Democrats looking to avoid a bitter primary.

"They were making a really good argument that if you have a bitter primary all the way to the end, then it would be harder for the Democrat to win," Gallego said, adding his own private polling confirmed that.

Gallego, 39 and one of the highest-ranking Latinos in elected office in Arizona, is in his third term representing Democratic strongholds in south and west Phoenix in Congress. He's built a liberal voting record and has become a prolific critic of President Donald Trump on his Twitter feed.

Gallego served in Iraq with the U.S. Marine Corps and is a graduate of Harvard University. His former wife, Kate Gallego, was elected Phoenix mayor this month and took office last week.

RELATED: Several challenges face new Phoenix mayor

"As a Navy guy, I know it's always better to avoid a fight with a Marine," Kelly said in a statement from his campaign. "I have a lot of respect for Congressman Gallego's service to our nation. I look forward to working with him to stand up for Arizona families."

Kelly has signaled he'll run a centrist campaign like the successful one waged in 2018 by fellow Democrat Sen. Kyrsten Sinema. He retired from NASA and the Navy, becoming an advocate for gun control laws after his wife, former U.S. Rep. Gabrielle Giffords, was shot in the head in an unsuccessful assassination attempt during a constituent event in 2011.

McSally is a former congresswoman from the same district as Giffords. She was appointed to McCain's seat after she narrowly lost to Sinema in the election for Arizona's other Senate seat.

McSally leaned heavily in that campaign on her record as the first woman to fly a combat mission.

RELATED: It's 2020 in Arizona: Can McSally win, will Woods run?

The 2020 election will decide who finishes the last two years of McCain's term. The seat will be up again for a full six-year term in 2022.

McCain, a legendary and beloved Arizona politician, died last year from an aggressive form of brain cancer after more than three decades in the Senate.

Former Attorney General Grant Woods, a longtime Republican who became a critic of President Donald Trump and registered as a Democrat, also considered a run but decided against it out of concerns about a nasty primary.

Associated Press writer Alan Fram contributed from Washington, D.C.