Sen. Susan Collins secured the endorsements of Maryland Gov. Larry Hogan and Massachusetts Gov. Charlie Baker, two Republican governors in deep-blue states, as her Maine race for reelection against challenger Sara Gideon is likely to come down to the wire in November.

Baker and Hogan, moderates who have managed to maintain high popularity with their very liberal constituencies, each cut ads appealing to Maine moderates who might be undecided between Collins, a centrist, and Gideon, the Democratic speaker of the Maine House of Representatives. The story was first reported by The Hill.

"Governors Charlie Baker and Larry Hogan are two of the best Governors in the country," Collins told Fox News in reaction to the endorsements. "They are strong, independent leaders who care deeply about their states and the people of this nation. I am so grateful to have their support."

SUSAN COLLINS FIRES BACK AT OPPONENTS OVER 'VERY SEXIST' CAMPAIGN ATTACKS: 'I'VE NEVER BEEN MORE OFFENDED'

The endorsements come as Republicans continue to worry whether they will be able to hold onto their Senate majority as they are playing defense rather than offense in most competitive seats this election cycle. Collins' race is one of those, and recent poll numbers have indicated that Gideon may be gaining a lead. The RealClearPolitics average of polls shows Gideon leading by 6.2 percentage points. The Cook Political Report still rates the race as a toss-up. The Collins-Gideon race has the potential to be the one that decides the balance of power in the Senate. Republicans see keeping the Senate red as an important bulwark against a potential Joe Biden presidency.

"Maine has a long history of independent-thinking leaders. And Susan Collins is exactly the kind of independent, thoughtful and effective leader that we desperately need in the Senate," Hogan says in an ad published by the Republican Jewish Coalition (RJC).

Massachusetts Gov. Charlie Baker gives a press conference on May 11, 2020 in the Gardner Auditorium of the State House over the state's approach to reopening the economy. (Blake Nissen for The Boston Globe via Getty Images)

In an add also produced by the RJC, Bakers adds: "As governor of Massachusetts, I work with both parties to get things done. Susan Collins does that in the Senate. She's pro-environment, pro-women, pro-Maine."

Collins has been a lightning rod for controversy largely because of her centrist views and status as a swing vote in judicial nomination fights that are often closely split along partisan lines. She cast the deciding vote to confirm Supreme Court Justice Brett Kavanaugh — something Democrats and Gideon have attacked her for and made a major issue in the Maine campaign, painting her as an automatic vote for Trump nominees.

In this Oct. 3, 2018, file photo Sen. Susan Collins, R-Maine, chairs the Senate Special Committee on Aging on Capitol Hill in Washington. (AP Photo/J. Scott Applewhite)

CLICK HERE TO GET THE FOX NEWS APP

"Senator Collins has voted to confirm dozens of Trump's anti-choice judicial nominees to lifetime positions, including Supreme Court Justice Brett Kavanaugh," Gideon tweeted recently.

But Collins opposed recent D.C. Court of Appeals nominee Justin Walker. Walker was the ninth Trump judge Collins opposed. And though she voted to confirm both Kavanaugh and Justice Neil Gorsuch, she also voted to confirm both Obama Supreme Court nominees — Justices Elena Kagan and Sonia Sotomayor.