The emails and voice mails to Dodge City, Kan., Mayor Joyce Warshaw began pouring in last month, after the city commission voted to require everyone in town to wear masks indoors.

Some anonymous messages told her that she was restricting civil liberties, Warshaw told The Washington Post. Others said she should go to jail over her vote.

But after the western Kansas city’s uphill battle against the coronavirus pandemic was highlighted in a USA Today feature Friday, the messages grew more frequent and aggressive: Burn in hell. Get murdered. One person simply wrote, “We’re coming for you.”

So after nearly eight years in government, she called it quits Tuesday.

“They were loud, and they were aggressive, and they frightened me and my family,” said Warshaw, who had been serving her second stint as mayor. “There’s a strong part of me that wants to say they are only words. But people are angry right now, and I don’t know that for sure.”

Amid a raging pandemic that has killed more than 303,000 people in the United States, she is far from the only elected official to recently resign over personal attacks with threats of violence. A cascade of nasty messages — and in some cases, crowds of armed protesters outside their homes — have led some public health officials to leave their posts this year.

Likewise, in the weeks since the election, public officials at all levels of government, and in both major parties, have faced an uptick in threats and intimidation — part of a divisive climate fueled by President Trump’s baseless claims of widespread voter fraud.

Warshaw, 69, had spent most of her career working in education, including nearly two decades as an elementary school principal until her retirement three years ago. When a vacancy on the nonpartisan city commission opened up in 2012, she was appointed to fill the spot by the rest of the body. Three years and one election later, she became the city’s third female mayor.

Her days in office were largely filled with the unglamorous but rewarding work heading up municipal affairs in Dodge City, a meatpacking hub known for its history as a Wild West frontier town. Last year, she was selected to co-chair the state’s Complete Count Committee, working to ensure Kansans participated in the 2020 Census.

Although Dodge City had mostly returned to normal after shaking off the pandemic’s first wave, infections began surging again last month. By the time Kansas Gov. Laura Kelly (D) again issued a statewide mask mandate in mid-November, 1 in 10 residents of the surrounding county had contracted the virus.

Deep-red Ford County was one of several jurisdictions across Kansas to opt out of the order. But on Nov. 16, the Dodge City Commission voted 4-to-1 to require masks in most indoor public spaces.

Residents had expressed mixed views about the rule to Warshaw and other commissioners, she said, but testimony from doctors and research from the University of Kansas convinced her that a mandate was the right choice. She had seen her daughter fight covid-19, and an aunt die of it, and wanted residents to be aware of the mounting risks.

Her vote in favor of the mandate landed her several aggressive emails and phone calls. But after USA Today on Friday chronicled the town’s struggle with the virus — in schools and meatpacking plants, and the council’s decision — her inbox exploded with so many violent threats that she and her husband began to worry.

Police are investigating the email threats, which represented only “a small, small portion of a fabulous city,” Warshaw said. But she could hardly go anywhere in Dodge City without running into someone she knew. What if she walked out of city hall one day and a disgruntled resident approached her with a gun? What would she do?

“I do not feel safe in this position anymore,” she wrote in a resignation letter Tuesday to the city manager, “and am hopeful in removing myself this anger, accusations and abuse will not fall on anyone else and will calm down.”

In a climate of increasing animosity and divisiveness, leaving her post seemed like it was the only option.

Between the political upheaval over the election and the pressures of the coronavirus and a struggling economy, Warshaw said, some people seemed to be acting out in ways they normally would not have. A registered Republican for several years, she recently became unaffiliated due to the “radical changes” she saw in the GOP.

“There’s a multitude of things coming down the pipe, causing people to be disgruntled with life,” she said. “People just want to blame somebody, and I feel like it was easy to blame me.”