Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Researchers thought they had a way to keep hard-to-treat patients from constantly returning to the hospital and racking up big medical bills. Health workers visited homes, went along to doctor appointments, made sure medicines were available and tackled social problems including homelessness, addiction and mental health issues.

Readmissions seemed to drop. The program looked so promising that the federal government and the MacArthur Foundation gave big bucks to expand it beyond Camden, New Jersey, where it started.

But a more robust study released Wednesday revealed it was a stunning failure on its main goal: Readmission rates did decline, but by the same amount as for a comparison group of similar patients not in the costly program.

“There’s real concern that the response to this would be to just throw up our arms” and say nothing can be done to help these so-called frequent fliers of the medical system, said study leader Amy Finkelstein.

Instead, researchers need to seek better solutions and test them as rigorously as new drugs, said Finkelstein, of the Massachusetts Institute of Technology and the National Bureau of Economic Research.

Federal grants and research groups at MIT paid for the study, which was published in the New England Journal of Medicine.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Just 5 percent of the U.S. population accounts for half of health care spending, and hospitalization is a big part.

A decade ago, Dr. Jeff Brenner started working with hospitals in Camden, a city with high poverty and crime rates, to identify people who go to hospitals frequently and target them with special services. He won a MacArthur genius grant for the work, and federal grants expanded the program to Aurora, Colorado; Kansas City, Missouri; Allentown, Pennsylvania; and San Diego. The government also paid for a study to see if it truly worked.

The study enrolled 800 hospitalized Camden patients with at least two other admissions in the previous six months and at least two of these conditions: homelessness, drug use, a mental health problem, trouble accessing services, lack of social support or use of five or more medicines.

Half were given usual care when they left the hospital. The rest were enrolled in Brenner’s program with nurses, social workers and others coordinating their care for three months. Patients received seven to eight home visits and nine phone calls on average. The effort cost about $5,000 per patient.

Six months later, the readmission rate was 62 percent in both groups, and there was no difference in total health care spending.

Researchers don’t know what usual care was for the comparison group. If that suddenly improved, it could explain why the program failed to prove better.

However, two key goals of the program — a home visit and a trip to a health provider within a week of leaving the hospital — were met for only 28 percent of participants. Homelessness and lack of a telephone were big reasons, and the program more recently has worked harder to get people into stable housing.

“If you’re in a shelter or on the streets, it’s just not easy to help and that sometimes leads to more hospitalizations,” said the Camden project’s leader, Kathleen Noonan.

Three months of help also wasn’t enough, and there weren’t enough places to get help for mental health or substance abuse problems, she added.

“We’ve evolved a lot” since the program began, said Brenner, who now is an executive working on similar programs at the insurance company UnitedHealthcare.

“The system is good at delivering care if you’re an average patient on an average day,” but not for, say, a homeless person in a wheelchair who is disoriented, Brenner said. “These patients have complex problems. If you don’t meet their needs, they’ll keep going to the hospital.”

The program was “clearly done with the best of intentions” and still may have provided useful care to the people who received it even though it didn’t reduce readmissions, said Dr. Aaron Kesselheim, a Harvard Medical School health policy expert who had no role in the work. Problems like readmission are much more complicated than they appear to be, he said.

Follow NBC HEALTH on Twitter & Facebook.