Maybe, the candidate said, “Mercury is in retrograde.”

Only the unusual planetary alignment — blamed for wacky or unlucky or otherworldly events — could explain what befell Mandela Barnes in the days leading up to Tuesday’s primary election in Wisconsin. In quick succession, the Democratic candidate for lieutenant governor was:

Erased from the race.

Pronounced dead.

And mistaken for a white person.

First, election notices published in at least three newspapers in two different counties omitted his name. Fearful that he had been left off actual ballots, Barnes, 31, called county clerks, who assured him that Election Day documents — those that voters would use to select candidates for high-stakes fall races — were accurate. Still, the Milwaukee native and former state representative worried. In a race stretching from the shores of Lake Michigan to the Minnesota border, how could he be sure that every county was faultless? The former community organizer, state lawmaker and deputy director of a national progressive policy organization knew he would have to take matters into his own hands.

He resorted to Twitter to protect himself — as one does. To leave no doubt, he changed the name of his account to “Mandela Barnes is Running for Lieutenant Governor.” His handle remained @TheOtherMandela, a reference to the anti-apartheid revolutionary and president of South Africa.

But the confusion didn’t end there. The day before the election, his picture was used in a local news report about a fatal motorcycle crash. As a newscaster announced the death of a 62-year-old man on a highway north of Milwaukee, an image of Barnes appeared. It was one of his official photographs, he said, showing him with a full beard and a bright red tie. “The man was pronounced dead at the scene,” viewers of the CBS affiliate learned.

He only heard reports of his own death when the wife of a friend at his pre-election celebratory dinner texted her husband about the faulty broadcast. “It was wild,” Barnes recalled.

The news station later made amends. “In a story that aired in our 1o o’clock news last night, we accidentally showed his picture during a story about a deadly motorcycle crash,” a news announcer said. “We do apologize again for that mistake.”

Then, on election night, an NBC affiliate in Green Bay reporting on early returns displayed his share of the vote, 70 percent at the time, with a photo of a white state representative, Dana Wachs, who had dropped out of the race for governor in June. A former colleague of Barnes noticed and posted about the error on Facebook, he said.

Barnes ultimately claimed 68 percent of the vote, earning more than double the number of votes as his closest competitor. His resounding victory made him onlt the second African American nominated for lieutenant governor in Wisconsin. He will join hands with Tony Evers, the state’s schools superintendent, to take on Republican Gov. Scott Walker and Lieutenant Gov. Rebecca Kleefisch in November.

All’s well that ends well, the Democratic nominee said in an interview Wednesday with The Washington Post.

“Obviously any level of upset that I was then doesn’t matter now that we won handily,” he said.

But the mishaps did trouble him. “We were upset at the time,” he said. “We were the only name left off the sample ballots. It wasn’t like a few random people were left off in just one paper.”

He couldn’t help but wonder whether what seemed like coincidences actually had more sinister undertones.

“I was the youngest person on the ballot, and one of very few people of color running statewide,” Barnes said. “Immediately, in the back of your mind, you do have that thought.”

Even though he now sees the mistakes as “just super random,” Barnes allowed that the bizarre events might hold unexpected lessons about the visibility of minority candidates, particularly in an election season that has brought many new faces into the fold. Also Tuesday, Christine Hallquist, with her victory in the Democratic primary in Vermont, became the first openly transgender major-party nominee for governor. With her victory in Connecticut, Jahana Hayes is likely to become Connecticut’s first black Democrat in Congress.

A 2016 Pew report documented “the upward yet uneven trajectory of black political leadership in America.” Between 1965 and 2015, the data revealed, the number of black members of the House had increased dramatically, but the number of black senators and black governors remained remarkably low. Currently, there are no black governors, though there are a number of prominent aspirants this year, including Stacey Abrams in Georgia and Ben Jealous in Maryland, both Democrats.

There are several black lieutenant governors, including Republican Jenean Hampton in Kentucky and Democrat Justin Fairfax in Virginia.

More from Morning Mix:

‘He’s a priest. I trusted him’: One of the 1,000 victims of alleged Pennsylvania clergy abuse tells his story

Citizenship service conspired with ICE to ‘trap’ immigrants at visa interviews, ACLU says