Instead of a concession call, Deputy Sheriff Mark Maggs received a pink slip.

On Tuesday, the 31-year-old faced off against his boss, Sheriff Lenny Gramkow, to be the Republican candidate for the top law enforcement job in South Dakota’s Bon Homme County, home to about 7,000 people.

That day, he was summoned by the sheriff to a meeting at 7 p.m., when the polls closed, though hours before results would come in. At 7:01 p.m., he was handed a letter, Maggs told the Argus Leader on Thursday. He was fired.

“Then when I got back to my election party and told my wife, she was very emotional,” said Maggs, who has four young children. “It hit her hard. We knew that meant coming at the end of the month we’d be losing health insurance.”

Soon after, he posted a photo to Facebook with a simple message: “Here’s the integrity of Lenny Gramkow.”

“THIS LETTER IS TO INFORM YOU THAT EFFECTIVE IMMEDIATELY YOU ARE TERMINATED FROM THE POSITION OF DEPUTY SHERIFF,” stated the notice, which was signed by Gramkow.

The letter, marked with a timestamp of “1901 HRS,” or 7:01 p.m., would turn a local battle into outrage around the country.

Here's the Integrity of Lenny Gramkow.

Posted by Mark Maggs on Tuesday, June 5, 2018

Maggs won his contest with Gramkow, 878 to 331. With no other candidates in the race, Maggs, who has said one of his top priorities would be “fighting the methamphetamine epidemic,” will begin his four-year term as sheriff in January, according to the Associated Press.

The letter did not provide a reason for the termination, but Maggs said that when he told Gramkow of his intention to run, the sheriff had brought up the possibility that he would be fired.

Bon Homme County Commissioner Russell Jelsma told the newspaper Inforum Wednesday that Gramkow was within his powers to dismiss the deputy.

The Associated Press noted that employment in South Dakota is at-will, meaning that workers can be fired for any reason, with some exceptions, and that sheriffs in the state are authorized to hire and fire employees.

In 2017, a federal judge ruled that a homicide detective could be fired for opposing the sheriff’s reelection, The Washington Post’s Tom Jackman reported.

Maggs did not immediately respond to a Facebook message seeking comment. According to the Argus Leader, he said county commissioners told him Thursday that they are planning a special meeting next Thursday to discuss the matter.

People have rallied to Maggs’s cause. As of Thursday night, more than 1,400 have signed an online petition exhorting Bon Homme County to reinstate Maggs, while the sheriff department’s Facebook page has received a slew of one-star reviews and criticism. The sheriff’s office and the county’s 911 system have been hit with calls, Maggs told the Argus Leader.

“Stop calling the sheriff’s office; those guys still have a job to do,” Maggs said.

Gramkow, who had won reelection in 2014, did not immediately respond to a phone message requesting comment.

The sheriff told the Daily Republic in March that he had hired Maggs but had no thoughts on his subordinate-turned-opponent. Instead he wondered why people would want to change sheriffs, “as long as he’s honest and does his job.”

“I wish it was hired just like any other job, I wish you wouldn’t have to worry about your job every four years,” Gramkow said.

Read more:

An FBI agent did a back flip in a club, dropped his gun and accidentally shot someone, police say

He was deemed paranoid, likely to be psychotic. Years later, he killed six in Arizona, police say.

‘At first glance this looks like a mistake’: Video shows Arizona officers beating unarmed man