Matt Morgan will be on the ballot as a Democrat as a candidate for the 1st Congressional District seat, Michigan's Board of State Canvassers determined Friday.

Due to a technical error in his nominating petitions, Morgan was barred from running as a Democrat in the Aug. 7 primary election. But he launched a write-in campaign to qualify as a Democrat for the general, and state elections officials said Friday he well exceeded the vote requirements needed.

Morgan had to obtain 5 percent of the total votes cast in the Democratic gubernatorial primary race in the 1st Congressional District, which came out to 3,781 votes, according to the Secretary of State's office. He obtained 29,293 votes in the Democratic primary as a write-in candidate.

"This win belongs to the voters of our district," Morgan said in a statement. "We had hundreds of volunteers working tirelessly in the days leading up to the primary, knocking doors and making phone calls. As a result, a whole lot of people showed up at the polls and made it clear they want a choice when they cast their ballots in November."

Morgan said the need to run in the primary as a write in "was perhaps one of the best things that happened to this campaign."

"The energy surrounding the write-in really provided an opportunity for people to share our story," he said.

Morgan will face incumbent U.S. Rep. Jack Bergman, R-Watersmeet, in the general election. Bergman was first elected in 2016.