Matt Dunlap defeated a candidate backed by the House Democratic campaign arm and is set to face former Gov. Paul LePage, a Republican, in a competitive general election.
Mr. Charles, a conservative Republican, had led the field ahead of a ranked-choice runoff. But Ms. Pingree, a former Maine House speaker, had been in a tight race with other Democrats.
It’s the third such deal the Interior Department has struck to pay firms to abandon plans for offshore turbines, spending roughly $2.5 billion to get companies to abandon their wind projects.
Ms. Collins, a Republican in Maine facing a tough re-election battle, defended her vote to confirm Justice Brett M. Kavanaugh as Democrats look to capitalize on it politically.