The Washington region is just weeks from having enough testing equipment, laboratory capacity and contact tracers to contain the spread of the novel coronavirus, assuming the public cooperates, officials said.

Despite having one of the highest rates in the country of people testing positive for the infection, the region is expected to achieve its desired capacity to conduct testing and tracing in June or early July, according to public health officials in the District, Maryland and Virginia.

That would fulfill a key requirement for continuing to reopen the economy. For months, the limits on testing and contact tracing have been a principal barrier to resuming business, social and cultural activities.

Three potential obstacles remain, officials said, and all depend on the public’s behavior.

First, people must come forward to get tested. Many mistrust health authorities or think there’s no point because testing hasn’t been available.

Individuals also must be willing to quarantine or isolate themselves for two weeks if they are infected with the virus or come in contact with others who are.

Finally, people must continue to respect physical distancing and hygiene guidelines to help limit the resurgence of covid-19, the disease caused by the virus, as restrictions are relaxed.

The picture has improved in recent weeks as testing sites have opened throughout the region, with more on the way, including for people who do not have symptoms.

That’s been possible largely because supplies of necessary apparatus have become more available. States, counties, private contractors and the federal government have been able to lay their hands on more nasal swabs, specimen media, testing reagents and personal protective equipment (PPE) such as masks and gowns.

Separately, state and local authorities have begun hiring hundreds of contact tracers, the foot soldiers who identify people exposed to the virus and urge them to isolate themselves so as not to infect others.

The District will have enough testing and tracing capacity to achieve containment by July, “if not sooner,” assuming the public cooperates, said LaQuandra S. Nesbitt, director of the D.C. health department.

“We’ve made tremendous progress” on overcoming supply-chain problems for testing materials, she said.

Officials in Fairfax and Montgomery counties were equally positive.

“I’d say to get the perfect marriage between increased testing and full contact tracing, we’re probably a couple of weeks away,” Montgomery Health Officer Travis A Gayles said.

“We are in a much better place every day, where the choke points are being addressed,” Fairfax Health Director Gloria Addo-Ayensu said. “Now really the challenge is there is more [testing] capacity than demand.”

The increased capability to test and trace is a major reason much of the region expects to enter Phase 1 of reopening this week, officials said. Having adequate capacity is also a necessary condition for moving ahead to later phases.

The other key conditions are seeing decreasing numbers of covid-19 cases, hospitalizations and deaths. That depends mainly on the public adopting public health recommendations such as to avoid close contact with others, wear masks and wash hands frequently.

Containing the coronavirus — or interrupting its transmission — is a goal that the United States might have achieved three or four months ago had it moved aggressively from the start to fight the virus as South Korea and Taiwan did.

Instead, the contagion outpaced containment here, and the nation settled for a mitigation strategy, aimed at reducing and delaying outbreak peaks.

But it is still possible to achieve containment if equipment and staff are available. That’s the goal until a cure or vaccine is developed.

“The vaccine would be really helpful, but right now, we have something in hand that will work if we do it right,” said Boris D. Lushniak, a former acting U.S. surgeon general who is dean of the University of Maryland School of Public Health.

Containment requires three steps: testing, contact tracing, and quarantine or isolation of those infected or exposed.

Testing has posed the biggest challenge, partly because the Trump administration declined to adopt a nationwide plan for producing and distributing testing supplies.

“It’s been a mess, which is what you have when you have a federal government that’s dysfunctional,” Arlington County Board Chair Libby Garvey (D) said. “We’re having to figure out how to substitute for a federal government that’s not there.”

But she’s encouraged that the state government has arranged to test 1,000 people Tuesday at the Barcroft sports center, and hopes Virginia will continue such weekly events.

Virginia is already close to its target of testing 10,000 people a day, up from about 4,000 to 5,000 a month ago, and would like to go even higher. It has obtained more testing kits and PPE and hired Mako Medical, a North Carolina company, to conduct thousands of tests.

“We need to make sure we have enough excess capacity to investigate outbreaks around the state,” said Karen Remley, a senior adviser to the state’s covid-19 response team.

Across the Potomac River, Montgomery announced a contract Thursday with AdvaGenix of Rockville to conduct 20,000 self-administered tests a week by June 8. County Executive Marc Elrich (D) called the deal “a game changer.”

And Prince George’s expects to increase its testing rate from 6,000 a week to 15,000 by the end of June. A private partner, LabCorp of North Carolina, has recently obtained large numbers of test kits.

“We're just turning the corner on those things,” Prince George’s Health Officer Ernest L. Carter said. “I feel optimistic that by July 1, we should be in a great position to be able to have controls over the spread if we get all the cooperation from the public.”

Contact tracing has been less of a problem, partly because public health departments are used to doing it to contain diseases such as tuberculosis and syphilis. The challenge has been to expand and train the workforce to do it on a much larger scale for the coronavirus, but the region’s jurisdictions are on their way.

Virginia had 129 contact tracers before the pandemic and has raised that number to 470. It aims to hire up to 1,300 more in coming weeks.

The District already has more than 4,000 applicants for up to 900 new contact tracing positions.

Maryland’s goal is to trace 1,000 cases and 10,000 contacts per day. It “will be fully operational toward that goal” this week, said Michael Ricci, spokesman for Gov. Larry Hogan (R).

But tracing works only if the public cooperates. Nesbitt said the District needs to publicize the availability and desirability of testing to overcome public wariness.

“We have some folks who are just not wild about going to get health care,” she said.

Falls Church City Council member David Snyder, who chairs the emergency preparedness committee of the Metropolitan Washington Council of Governments, warned that people reached by contact tracers may not be willing to cooperate.

“Can you convince people that just because they’ve been in a room with someone [who is infected], they should be out of circulation for two weeks?” Snyder said. “There are serious questions about public acceptability for this.”

Health officials said the alternative is more disease, deaths, and broader and longer shutdowns. Containment is preferable, and Lushniak, the U.-Md. dean, said, “it’s doable in this region in a matter of weeks.”