Former Gov. Paul LePage, a Republican, has won the race for Maine’s 2nd Congressional District. The Associated Press projected his win Thursday, after the state finished its ranked-choice count. Mr. LePage beat Democrat Matt Dunlap.

The Maine Secretary of State’s Office finished the count on Thursday and announced the results in a livestream, WMTW reported. In the first round, with blank ballots set aside, Mr. LePage had 50.63 percent of the vote. After second-choice votes were added in, he finished with 50.81 percent.

The race went to a ranked-choice count because no candidate won more than half of the first-choice ballots on Election Day. Results the secretary of state’s office announced on Nov. 5 showed Mr. LePage in first place with 49.894 percent.

The count took three days at the Maine Department of Public Safety headquarters in Augusta. It was open to the public and was streamed on Monday, Tuesday and Thursday. The secretary of state’s office said the results are not official until the official count is delivered to the governor.

Mr. LePage has spent the week in Washington at an orientation for new members of Congress. On Thursday, he joined other newly elected members for a group photo on the steps of the Capitol, according to the Associated Press.

The result puts the seat in Republican hands. The Associated Press said it was the only seat in the country that went from Democratic to Republican without the help of redrawn district lines. President Trump won the district by 9 points in 2024, according to the AP.

Maine’s 2nd District covers more than 27,000 square miles. It is the largest congressional district by area east of the Mississippi River.