(CNN) Maine Sen. Susan Collins said Friday she has decided to stay in the Senate, where she is a moderate Republican swing vote, rather than running for governor in 2018.

Collins announced her plans at a local Chamber of Commerce breakfast in Rockport.

Her decision means Collins will continue to wield major influence in the Senate, where twice this year she was one of three Republicans to break with President Donald Trump and oppose the GOP's efforts to repeal the Affordable Care Act.

She read a note from a colleague -- whom she did not name -- who had told her "the institution would suffer in your absence."

"As I thought about the senator's words, I realized how much needs to be done in a divided, troubled Washington, if we are to serve the people that we represent effectively. I have demonstrated the ability to work across the aisle to build coalitions and to listen to the concerns of the people of my state, my country and my colleagues," Collins said.

Listing off issues such as higher health care costs, a nuclear-armed North Korea and Russian interference in last year's US election, Collins said she wants to "continue to play a key role" in leading issues, and noted that she had climbed in Senate seniority from 99th to 15th.

"The best way that I can contribute to these priorities is to remain a member of the United States Senate," Collins said.

Collins began her remarks Friday by launching into a lengthy explanation of why she opposed the health care bills.

"I was guided by the central tenet of the Hippocratic Oath: First, do no harm," she said. "The current system is not working for many Americans, but in trying to solve the problem, it's important that we not make matters worse."

Collins' clashes with her own party could have made it difficult to win the Republican primary in the race for the governor's office currently occupied by Paul LePage, a bombastic figure much more in line with Trump. Re-election to her Senate seat in 2020 would likely be a safer bet.

A source with knowledge of Collins' thinking said over the last year the Maine senator had taken a serious look at running for governor. Collins values constituent services, felt she could do more in an executive role and, the source said, liked the idea of capping her political career as Maine's first female governor.

But, the source said, the reality of Collins' prominent role in the Senate -- where she has seniority and is a swing vote on nearly all major legislative items -- has led Collins to rethink whether she wants to depart now. Another factor in her thinking is that her friend, Arizona Republican Sen. John McCain, is being treated for brain cancer -- which, the source said, has made Collins' voice countering Trump more important.

In a reflection of that line of thought, Collins on Friday criticized the Trump administration's decision to end cost-sharing subsidies under Obamacare, issuing a call to "stabilize the insurance markets very quickly."

"The point is, when we're dealing with an issue that affects millions of Americans, we need to understand the consequences of what we're doing -- not vote in the middle of the night on bills that have had no substantive hearing and little analysis," she said.

"We must stop allowing partisanship to be a pre-existing condition that prevents meaningful health reform," Collins added.

Huge influence in Senate

Collins is Maine's senior senator, having served since her first election in 1996. She began her career in politics as an aide to Maine Sen. William Cohen, and served briefly in the Bush 41 administration. In 1994, Collins ran as the first major-party female candidate for Maine governor, but was defeated, coincidentally, by Angus King, who now serves as her junior colleague in the Senate.

In 1996, Collins won Cohen's old US Senate seat. She joined Olympia Snowe to form just the third all-female US Senate delegation, further distinguished by the fact that both were members of the Republican Party in the largely Democratic northeast.

Collins reflected her state's independent streak -- Maine splits its electoral votes and has been fertile ground for third-party candidates -- and over the course of her career in Congress, she emerged as a regular swing vote in high-stakes policy debates.

In 2009, Collins, along with Snowe, was just one of three Republican senators to vote for the stimulus package crafted by the Obama administration in response to the Great Recession. And though Collins voted against passage of the Affordable Care Act that same year, she was also a key "no" vote in Republicans' efforts to repeal the health care law earlier this year -- remaining opposed even in the face of a fierce lobbying campaign from party leaders and the White House.

Collins is also one of the few pro-abortion rights Republicans in Congress, supported a 2013 bill to expand background checks for gun purchases and came out against Trump's travel ban in the early months of the new administration. With Republicans currently holding just a two-seat edge in the Senate, Collins' vote has rarely been more influential.

The Maine senator's independence, however, has led to increasingly frequent clashes with her own party in recent years. Before she helped scuttle Obamacare repeal, Collins was among the Republicans most critical of Trump during the 2016 election. Collins held out on endorsing, and eventually wrote an op-ed for The Washington Post explaining why she wouldn't be voting for Trump.

Still, Collins easily won re-election in 2014, is well-regarded within her state. She serves on the powerful Senate appropriations and intelligence committees.