WASHINGTON — In the waning days of summer, Deputy Secretary of State John Sullivan was quietly dispatched to a Pennsylvania brain clinic to investigate for himself what government doctors had described: American diplomats and spies suffering from a mysterious set of ailments.

For two years, the U.S. intelligence community and FBI investigators had tried and failed to solve an astonishing international mystery about who or what is attacking its diplomats overseas.

What researchers presented to Sullivan in late August didn’t answer that question. But over four hours and a working lunch, neurologists and researchers showed Sullivan how they were tracking water molecules traveling through the central nervous system to create computerized maps that confirm that the damage to the U.S. workers’ brains is real.

Medical experts in four states and officials from at least seven U.S. federal agencies are now actively on the case, including the Navy, the National Institutes of Health and the Centers for Disease Control and Prevention. They join other officials from the CIA, the State Department and allied governments who have been hunting for a culprit since U.S. diplomats and spies serving in Cuba and later in China started hearing strange sounds and falling ill in late 2016.

Now that the government is deploying its military and medical research arms, costs for research and treatment have run into the tens of millions of dollars, U.S. officials tell NBC News.

The mystery has weighed heavily on the patients, unsure if and when they’ll fully recover and how their health might be affected long term. Some still spend much of their time shuttling between doctors and rehab appointments as they struggle with visual, hearing and cognitive problems. Others have tried to move on with their lives or started new posts overseas, even while they demand information and accountability from the U.S.

The lack of answers has also had a profound effect on U.S. ties to Cuba, which were just starting to mend in 2016 after half a century of estrangement, and has put the U.S. on high alert for similar attacks elsewhere.

With the U.S. Embassy in Havana operating at only partial capacity, the CIA has had to shut down its station there, officials said, depriving the U.S. of a key source of information just as the island is in the throes of a historic change in leadership.

And half a world away, in China, about 70 U.S. diplomats and their families serving in China have undergone testing in the last few months amid concerns they could have been affected by health attacks, too, State Department officials said.

They join another 300 who were tested in China earlier this year after the U.S. disclosed that one of its workers in Guangzhou was "medically confirmed" to have the same symptoms as the Cuba cases.

In additional countries where U.S. diplomats serve, a few dozen more have also been tested. They’ve been given the Acquired Brain Injury Test, or ABIT, developed by the U.S. to test for health attacks. But officials wouldn’t name those countries or say what prompted the concerns.

"To date, each report has been carefully evaluated and there have been no new incidents that are cause for concern," the State Department said. "Medical screening is available around the world for embassy personnel who may raise a concern."

Since the incidents started in 2016 in Cuba, 26 U.S. workers who served there and about a dozen Canadians have been confirmed to have been affected by what the U.S. calls "targeted health attacks" from an unknown source. Cuba adamantly denies any knowledge or involvement in the attacks. One U.S. diplomat in China who reported strange sounds and sensations was confirmed in 2018 to have the same symptoms. The incidents caused hearing, balance and cognitive changes along with mild traumatic brain injury.

With the FBI investigation making little progress, the Trump administration has turned to the Defense Department to try to recreate the technology that harmed the Americans. The Office of Naval Research’s "Code 34" Warfighter Performance Department has been researching how different energy sources affect the human body and specifically the head.

"There’s several research projects ongoing at the military," Dr. Michael Hoffer, a former military physician who first evaluated the Cuba patients, said in an interview. "This research is going to lead us to a solution, but we really have to support that research."

Hoffer and his colleagues, including at the University of Pittsburgh, have briefed Pentagon officials about their findings and are supporting the Navy’s research. In connection with that research, federal spending records show that the Navy also awarded $363,000 this year in grants to the University of Pittsburgh to study how electromagnetic or sound waves interact with the cranium, including how changes to liquid in the head can form bubble-like waves of pressure that could affect various parts of the brain.

The Office of Naval Research declined to comment.

Meanwhile, at the National Institutes of Health in Bethesda, Maryland, government doctors and scientists are developing an in-depth clinical research study to try to understand what’s happened to the diplomats’ bodies and how long the symptoms will last. Patients are undergoing five full days of testing on various bodily systems to learn more how they interact with the brain. The study is expected to include control groups and is awaiting Institutional Review Board approval.

A separate program is underway at the CDC, which is studying the incidents as a public health risk. The agency is working to create a formal “case definition” for the illness, including risk factors and a full list of common symptoms, to be used to better track its spread. CDC’s epidemiologists traveled to China this year to gather data from U.S. workers and relatives who complained of neurological symptoms, officials said.

And at the University of Pennsylvania, where the U.S. is sending its patients for treatment, doctors have proposed to the U.S. government that they be allowed to create a Comprehensive Brain Injury Clinic that would serve as a rapid triage center in the event there was a major outbreak somewhere in the world. Currently, Penn’s doctors only have the bandwidth to perform fewer than eight comprehensive evaluations a week when a diplomat is medevaced to Penn from overseas.

Sullivan traveled to Philadelphia on Aug. 28 to personally discuss the health attacks with doctors and review their latest medical findings. And in Congress, lawmakers have taken a renewed interest in the case, with Democratic and Republican staff from the House Foreign Affairs Committee meeting recently with the Americans flown from China after a NBC News report about their situation.

In the meantime, the deterioration in U.S. ties to Cuba has been compounded by President Donald Trump’s moves to tighten enforcement of longstanding sanctions. After the first tranche of diplomats in Cuba fell ill, the U.S. issued a travel warning for Cuba, withdrew most of its diplomats from Havana and ordered out all relatives of diplomats.

So for more than a year, the embassy has been operating with a skeleton staff and has stopped performing critical services such as issuing visas for Cubans who want to visit the U.S. Those who want visas must travel to the U.S. embassy in a third country such as Guyana, significantly increasing the cost and time involved.

Cuba’s Embassy in Washington didn’t respond to requests for comment. But James Williams, president of the U.S.-based group Engage Cuba, said the situation was taking a significant human toll on both Cubans and Cuban-Americans.

"These families who are not seeing each other, businesses that are not growing as a result and lives divided with not a really good solution and no prospects on the horizon for a fix," Williams said. "It’s just untenable."