Diana Vega, a registered respiratory therapist, instructs Nevada National Guardsman on how to test people during the setup of a temporary coronavirus testing site Monday, Aug. 3, 2020, in Las Vegas. Credit: John Locher | AP

BOSTON — Fourth of July gatherings, graduation parties, no-mask weddings, crowded bars — there are reasons the U.S. has racked up more than 155,000 coronavirus deaths, by far the most of any country, and is fast approaching an off-the-charts 5 million confirmed infections, easily the highest in the world.

Many Americans have resisted wearing masks and social distancing, calling such precautions an overreaction or an infringement on their liberty. Public health experts say the problem has been compounded by confusing and inconsistent guidance from politicians and a patchwork quilt of approaches to containing the scourge by county, state and federal governments.

“The thing that’s maddening is country after country and state after state have shown us how we can contain the virus,” said Dr. Jonathan Quick of the Duke Global Health Institute. “It’s not like we don’t know what works. We do.”

Confirmed infections in the U.S. have topped 4.7 million, with new cases running at more than 60,000 a day. While that’s down from a peak of well over 70,000 in the second half of July, cases are on the rise in 26 states, many in the South and West, and deaths are climbing in 35 states.

On average, the number of COVID-19 deaths per day in the U.S. over the past two weeks has gone from about 780 to 1,056, according to an Associated Press analysis.

In Massachusetts, health officials are investigating at least a half-dozen new clusters of cases connected to such events as a lifeguard party, a high school graduation party, a prom party, an unsanctioned football camp and a packed harbor cruise trip.

One recent house party on Cape Cod attended by as many as 60 people led to more than a dozen new cases and prompted some restaurants to close or limit service at the height of the tourist season.

Hot spots around the U.S. are popping up in what once seemed like ideal places to ride out the outbreak: rural, less populated and with lots of outdoor space. In South Dakota, a spike erupted at a Christian youth summer camp in the Black Hills, with cases growing to 96 among 328 people who attended.

“We’re at a point where there’s enough spread of COVID-19 that people throughout the U.S. are at an increased likelihood of encountering the virus and getting exposed,” University of Florida epidemiologist Dr. Cindy Prins said.

She added: “This is a behavioral disease right now for a lot of people.” Prevention means “changing our behavior, and it’s so hard for humans to do. We’re social creatures.”

In Mississippi, Republican Gov. Tate Reeves grudgingly reversed course and announced a statewide order requiring the wearing of masks because of a resurgence of the virus. He also delayed the start of the school year for upper grades in eight hard-hit counties.

“Wearing a mask — as irritating as it can be, and I promise you I hate it more than anyone watching today — is critical,” he said.

In Virginia, cases have surged so much in cities like Norfolk and Virginia Beach that Democratic Gov. Ralph Northam placed limits there last week on alcohol sales and gatherings of more than 50 people. Northam, the nation’s only governor who is a doctor, cited rising infections among young people and said the problem is that “too many people are selfish.”

“We all know that alcohol changes your judgment,” he said. “You just don’t care as much about social distancing after you’ve had a couple of drinks.”

Dr. Demetria Lindsay, the Virginia Department of Health’s district director for Virginia Beach and Norfolk, said there has been a pronounced spike among people ages 20 to 29. She said the factors behind the surge include gatherings of people not wearing masks or maintaining a safe distance.

“Father’s Day, Memorial Day, graduations, birthdays, backyard barbecues, you name it,” Lindsay said.

In Brandon, South Dakota, thousands of car racing fans packed the 9,000-seat Huset’s Speedway over the weekend. Many did not cover their faces or stay away from others.

“We’re kind of over this whole COVID thing. I won’t wear a mask unless I absolutely have to,” 21-year-old Veronica Fritz said. She added: “I am a very strong Christian and I know where I’m going, and I believe God will take me when I’m supposed to go. So if I get COVID and I die from COVID, it’s not my decision.”

Research has shown that people can spread the virus before they feel sick. Masks lower the likelihood of their respiratory droplets reaching other people.

Josie Machovec, a mother of three who is suing over a mask ordinance in Palm Beach County, Florida, said that she doesn’t believe the government has the right to require people to wear medical devices, and that she hasn’t seen clear evidence that masks stop transmission of the virus.

“I’m someone who has looked into this extensively and don’t feel that it’s the right thing for me and my kids. If we are healthy, we don’t need to be wearing them,” she said, “and if we’re not healthy, if we’re sick, then we stay home.”

In Minnesota, a group of voters sued Gov. Tim Walz and other officials on Tuesday to try to block a requirement that voters wear face masks at polling places.

Nearly a quarter of Wisconsin’s more than 55,000 cases have been confirmed over the past 14 days. Much of the spike has occurred in the state’s densely urban southeastern corner, but the disease has also spread with amazing speed in rural and sparsely populated northern Wisconsin.

Despite the trend, health industry software provider Epic Systems is requiring its 9,000-plus employees to return to work in person at its sprawling campus outside of Madison by Sept. 21. Workers decried the order, but company CEO Judy Faulkner defended the decision, saying better work is done on campus than from home.

Zona Wick, a spokeswoman and contact tracer for the health department in Wisconsin’s Iron County, attributed the dramatic rise in cases to July Fourth gatherings, birthday and graduation parties, out-of-county visitors and people crowding into bars.

“The Fourth of July was tough on us,” Wick said. “People had a bit of quarantine fatigue, is what I’m calling it. People got a bit tired of staying in. People just got together like they have for years on the Fourth of July and spread it to one another.”

The wedding industry likewise is seeing no-mask receptions with busy dance floors and no social distancing.

Wedding planner Lynne Goldberg has a December wedding scheduled for 200 guests at the home of the bride’s parents in upstate New York.

“They have emphatically shared that this pandemic is not going to get in the way of their wedding plans and that there will be no masks handed out and no signs promoting social distancing at their wedding,” she said. “The bride has said that when she shows her children her wedding video, she doesn’t want it to be a documentary of the 2020 pandemic.”

Story by Suman Naishadham, Carla K. Johnson and Philip Marcelo. AP journalists around the world contributed to this report.