Senator Joe Manchin (D-WV) speaks to supporters at a campaign stop ahead of the 2018 midterm elections in Bridgeport, West Virginia, U.S., November 5, 2018.

Sen. Joe Manchin will not run for governor of West Virginia, ensuring Democrats will keep a key Senate seat for a few more years.

The senator declined to challenge Republican Gov. Jim Justice next year, his spokesman said Tuesday. Manchin, considered one of the more centrist members of the Senate, won reelection to another six-year term last year.

In a statement Tuesday, the Democrat said he "loved" his stint as the state's governor from 2004 to 2010. But he said he decided to stay in the Senate after considering "where [he] could be the most effective" for West Virginia.

"Ultimately, I believe my role as a U.S. Senator allows me to position our state for success for the rest of this century," Manchin said, highlighting health care, energy and infrastructure as some of his top priorities in the Senate.

His presence is critical for Democrats as they push to take control of the chamber. If Manchin left the Senate, his party could have a tough time winning his seat in West Virginia. President Donald Trump carried the state by about 40 percentage points in 2016.

Republicans currently have a 53-47 edge in the Senate. The GOP has to defend 23 seats next year, while 12 Democratic seats are up for grabs.

Manchin stands among the Democrats most likely to vote with Trump's priorities and confirm his Cabinet and judicial nominees. He has angered liberals by siding with the GOP on some abortion-related bills and by voting to confirm Supreme Court Justice Brett Kavanaugh last year. The senator has also done more to boost the flagging coal industry — which has a major presence in his state — than many Democrats would like.

Still, he has served as a buffer for his party against Republican legislative priorities. Manchin voted against a GOP plan to repeal parts of the Affordable Care Act in 2017 as the measure failed by only one vote.

The senator has touted his ability to work with Republicans, most recently in an effort to revive gun background check legislation authored with Sen. Pat Toomey, R-Pa.

Subscribe to CNBC on YouTube.