Massachusetts has one of the most educated and affluent populations in the country. It’s home to some of the nation’s most preeminent medical centers. And it has political leaders who have worked cooperatively, across party lines, in the face of a crisis.

Massachusetts also has the third-highest number of confirmed state coronavirus cases, along with the fourth-highest death toll. And despite predictions that numbers would be falling by now after a month and a half of people staying at home, new case counts have instead remained stubbornly high.

The state’s struggle to combat the coronavirus reflects just what a tenacious adversary it really is. Even for a place that has a lot going for it, the toll has been severe — and it is growing by the day.

As of Friday, Massachusetts had more than 64,000 cases — behind only New York and New Jersey, its larger northeastern neighbors. New cases totaled 2,106, continuing a dismal streak lasting more than two weeks of at least 1,500 additional cases per day. Deaths hit 3,716, behind only New York, New Jersey and Michigan.

Even as many states began opening up their economies Friday — allowing restaurants, shopping malls and hair salons to do business — that remained a distant prospect in Massachusetts. Instead, Gov. Charlie Baker (R) on Friday was announcing new restrictions, including a requirement that people wear masks while in public.

“This is going to be a way of life,” Baker said. “No ifs, no ands, no buts, no doubts.”

The persistence with which people keep getting sick in Massachusetts has been matched in other hard-hit states. Rather than a precipitous decline, the number of new cases in places such as Illinois, California and the D.C. metro area has instead been leveling off slowly.

Experts say that is to be expected, even if it means a long road ahead.

“If social distancing is done well — and Massachusetts has done it pretty well — the effect is going to be to flatten the curve and spread it out over more time,” said David Hamer, professor of global health at Boston University and an infectious-disease physician at Boston Medical Center. “Instead of a peak, it’s a prolonged plateau. It’s going to be a gradual decline.”

Like other states, Massachusetts has avoided some of the most dire projections about how many people would fall ill. Its social distancing measures also have prevented hospitals from becoming overwhelmed.

But actually pushing down the rate — rather than treading water — will be tricky to pull off, because of the nature of who is getting sick.

More than half the state’s deaths have been people in long-term-care facilities, such as nursing homes. The elderly make up a slightly higher share of the Massachusetts population than the national average.

Essential workers — who have to commute to their jobs each day and often are in close quarters with others — also have been hit hard.

“Some people have been able to completely shelter at home. Their risk of getting anything is very low indeed,” said Jeffrey K. Griffiths, who teaches public health at Tufts University. “But there are other groups of people that man the gas stations, the grocery stores, the hospitals. They’re police and firefighters. They still have to go to work.”

And then there are the poor, for whom social distancing at home is particularly challenging.

Geralde Gabeau, an advocate for the state’s Haitian community, said she knows of immigrant families that are living 10 to a two-bedroom apartment and sharing a single bathroom.

“If one person gets infected, the likelihood of everyone being infected is very high,” she said. “There is no room for people to isolate.”

Gabeau said the immigrant assistance group she runs, Immigrants Family Services Institute-USA, has gone from helping 60 families to more than 300. “Our phone never stops,” she said.

And she hesitates before opening Facebook: “All you see is RIP,” she said. “Every single day, people are losing their grandparents. Yesterday we lost a young man, 34 years old. A family in Boston lost four people. The Haitian community is mourning like crazy.”

Immigrant groups say Massachusetts needs to do a better job circulating information about the coronavirus in multiple languages. Though much of the literature is translated into Spanish, that accounts for only about 40 percent of the state’s population that is not proficient in English. Gabeau said she has taken it upon herself to produce videos in Creole to help spread the truth about the virus for the Haitian community, which makes up a significant share of the state’s 1 million-plus foreign-born residents.

Massachusetts was among the earliest states to reckon with a coronavirus outbreak, recording its first case on Feb. 1. But Hamer said the virus was probably present far earlier, and it was far more widespread than anyone knew when Baker declared a state of emergency on March 10. With everyone cooped up indoors for the New England winter but without official mandates to socially distance, the virus had ample opportunity to spread.

Many of the cases from early March were traced back to a late-February conference hosted by a biotech company, Biogen.

Experts say that on the whole, the state has done well with its response. Baker is a Republican, while Democrats dominate the legislature. The two sides have worked cooperatively, with little partisan rancor.

“I would say that as a state we are doing this right,” said Maryanne Bombaugh, president of the Massachusetts Medical Society. “It’s a very positive example of how you can work together and make a difference for your people.”

Bombaugh cited in particular the prevalence of testing in Massachusetts, including of the asymptomatic, which she said accounts at least in part for the state’s relatively high infection levels. The state also is tracing those who come into close contact with people who have tested positive, a vital step in containing future outbreaks.

Unlike states that have been besieged by protests, there has been comparatively little pressure in Massachusetts to reopen before public health experts give the all clear. The state is among a coalition, led by New York, that is trying to coordinate reopenings across the Northeast rather than acting individually, as many states have done.

The state’s nonessential-business closure extends until at least May 18, with an advisory group due to report back to Baker by then on the best way to gradually reopen.

The governor on Friday said he was encouraged by a slight decrease in the percentage of coronavirus-positive patients requiring hospitalization. “Overall, this is a very good sign,” he said.

Yet testing is still below what epidemiologists would like to see before stay-at-home restrictions can be lifted. A sustained drop in positive results is another prerequisite. And although experts say it is probably coming, it will take some time to get there.

“The plateau is telling us that we’re getting there,” Griffiths said. “But if we were to open up again while we’re at that plateau, we would just see another sharp spike up.”