Incumbent Sen. Jon TesterJon TesterRed-state Dems face tough votes on Trump picks Montana Republican warns of Senate challenge to Tester Vulnerable Dems ready to work with Trump MORE (D-Mont.) is projected to win reelection to the Senate over Rep. Denny Rehberg (R).

The Associated Press called the race Wednesday morning; it was too close to call late Tuesday night.

According to CNN, Tester had a 49-45 lead over Rehberg on Wednesday morning, with 83 percent of precincts reporting.

The victory adds to a great night for Senate Democrats, who so far have expanded their majority by two seats. A final seat being vacated by retiring Sen. Kent Conrad (D) in North Dakota remains in play, but Democrat Heidi HeitkampHeidi HeitkampTrump meets with Dem senator amid Cabinet speculation Dem senator shares Trump Tower elevator with Naked Cowboy Overnight Energy: Walden wins Energy gavel | Trump looks at Dems to head Energy, Interior MORE has a narrow lead over Rep. Rick Berg (R-N.D.).

Tester was a top GOP target from the beginning of the year, and Republican outside groups spent millions of dollars to defeat him. But his centrist profile and reputation as a hard-working Montana farmer helped Tester run comfortably ahead of President Obama in the Republican-leaning state.

Tester also was effective at painting Rehberg as an out-of-touch millionaire, attacking the congressman for suing the Billings, Mont., fire department and using a clip of Rehberg describing lobbying as an "honorable profession" in ads.

Tester thanked his campaign supporters in a Wednesday morning press conference in Montana.

"It is an honor to accept your trust in sending a Montana farmer with Montana values back to the United States Senate," he said.

Just before Tester spoke, Rehberg congratulated Tester.

The voters of our state have spoken, and I respect their decision. Senator Tester and I share an abiding love for Montana and America, a value which transcends political party or disagreements on matters of policy.

A confirmed Tester victory gives Democrats a 52-45 margin in the Senate over Republicans. Two Independents in the Senate are expected to caucus with Democrats.

A Rehberg loss could set him up to run against Montana's other Democratic senator, Max BaucusMax BaucusThe mysterious sealed opioid report fuels speculation Lobbying World Even Steven: How would a 50-50 Senate operate? MORE, in 2014. Rehberg and Baucus have some history, stemming from Rehberg's 1996 attempt to win Baucus's Senate seat.

In that contest, information about Baucus's divorce was leaked to the press, which many agree created bad blood between the two candidates.

—Erik Wasson contributed.