One kind of cell "was actively and aggressively eating the bone," says Harvard orthopedic surgeon Dr. William H. Harris. "It became a medical detective mystery: What in the world is this disease and how does it come about?"

Jesse Costa/WBUR

Please sign up here to subscribe to WBUR's CommonHealth newsletter highlighting important stories about health and medicine.

It all began with a single X-ray.

It was 1974, and surgeons had been doing total hip replacements for a dozen years.

"Total hip replacement is an absolutely magnificent operation," says Dr. William H. Harris, "and we were able to do remarkable things to restore mobility and relief of pain and the joy of life to countless individuals."

As chief of Massachusetts General Hospital's joint replacement surgery service, Harris was sent a mystifying patient, a prominent lawyer from San Francisco whose hip replacement had gone badly awry.

"I had never seen anything like this before," he recalls. "The bone around his prosthesis, around his total hip, had been completely destroyed. It was just astonishing. And I thought it had to be cancer."

But under the microscope there was no cancer, no recognizable disease of any kind. It was something much stranger.

So begins the twist-filled backstory of disaster averted that Harris tells in his new book, Vanishing Bone: Conquering a Stealth Disease Caused by Total Hip Replacements.

Now 90, Harris holds an endowed professorship of orthopedic surgery at Harvard Medical School. He was chief of joint replacement surgery at MGH for 30 years. And he's one of the doctors and researchers that grateful recipients of artificial hips may want to thank.

Those patients are legion: At least 3 million Americans have artificial hips, and millions more around the world.

Back to his tale: No visible cancer. The only type of cells to be seen on the ruins of the bone were a sort of cleanup cells, called macrophages. And they were stimulating another kind of cell, called an osteoclast, which means "bone-eater."

"This was the only cell in the body that could eat bone and it was actively and aggressively eating the bone," Harris explains. "It became a medical detective mystery: What in the world is this disease and how does it come about? Why is it there?"

The question quickly became even more urgent, because soon it wasn't just one patient or two whose replacement hips were being attacked by this bone-eating disease. It was thousands — then hundreds of thousands. The longer people had their replacement hips, the higher the risk. In some, their bones became so weak, just walking could make them snap.

"Over time, it began to involve so many people that around the world there were a million people with this condition," Harris says. "By 1990 it was clear that it was the No. 1 problem in total hip replacement surgery and the No. 1 cause of failure."

One of the first possible culprits to come under suspicion was the "bone cement" — the glue used to affix the artificial joint to the patient's skeleton. Tiny bits of the cement seemed to be triggering the odd response by the cleanup cells and the osteoclasts.

So Harris and others devised techniques to replace hips without using cement. And they heaved a sigh of relief, he says, thinking they'd solved the problem. Only to find, when he reviewed his first hundred cases of a cementless hip replacement — "Bingo, the very same disease."

But they were on its trail. The problem wasn't just the bone cement, they realized, it was that tiny bits of plastic could eventually trigger the osteoclasts to eat bone. And those bits of plastic were coming from the inevitable wear on the plastic at the replacement joint as the patient logged millions of steps.

"This caused a big shift in our thinking, and the problem shifted from being a problem of medical detective work to find out what in the world is going on, to innovation — material science," Harris says.

Harris and other researchers needed to figure out how to make an artificial hip joint that could take a load of hundreds of pounds, for millions of steps, without wearing down enough to release the particles of polyethylene plastic. And to do that, he decided, he needed a machine that could simulate what happens to hips in the body.

It took three years and plenty of frustration to build an accurate hip simulator. Meanwhile, his team gained a pivotal insight from using a powerful scanning electron microscope to look at the replacement hips of patients who donated them back to his lab after death: It was the process of walking that modified the polyethylene.

The polyethylene plastic on the hip implants was an extraordinarily long molecule. Harris compares it to a very, very long, very, very thin string of spaghetti. And normally, the plastic is like a bowl of spaghetti that is unorganized, with the strands going in all different directions. But not in the hips from the deceased patients.

"We found that all of the strands of the polyethylene were lined up in a row," he says. "The polyethylene molecules had been changed in their position. They'd been modified by the fact that gait simply goes back and forth, and forth and back. And that lines them up."

Harris turned to his friend Ed Merrill, a professor emeritus of polymer chemistry at MIT, and asked if he could stop this reorientation from happening.

"He said, 'Sure,' and I said, 'I love it, that's wonderful, tell me about it. How are you going to do it?' 'Well,' he said, 'we do that for a lot of molecules. We get them to be fixed in their position by putting in energy, and that energy then links one of the molecules to the next one.' "

It's a process called cross-linking, used on many materials. Merrill suggested using an electron beam to cross-link the polyethylene in artificial hips. When Harris and his team tried it, they ran into a few problems at first, the most striking of which was that the plastic exploded.

"Sometimes it didn't explode, sometimes it just caught fire," Harris says. "And at other times it simply melted. But clearly we were in a difficult spot. It took a lot of work to figure out what that problem was."

The problem turned out to be a matter of too much energy. They needed to slow the electron beam down so it wouldn't "overcook" the plastic. Once they figured that out, they could test it. The results: "We could detect no wear at all. Zero wear. We thought it might reduce wear, it might make it better. It made it almost perfect."

There's a lot more to the story in Vanishing Bone. It wasn't enough to invent the new plastic; it had to be patented and licensed, approved by the Food and Drug Administration, and manufactured — all of those steps involved additional challenges. But in late 1998, the first patient got a hip made with the new plastic.

Fast forward nearly 20 years, "and there are probably now 7 million people around the world walking on this material in total hips and in total knees," Harris says. "The disease is virtually gone."

So that's certainly a happy ending, but what's the moral of the story? For Harris, it serves as an example of contemporary medical science — "how it works, warts and all, the complexity, the need for persistence."

And, he says, it highlights the special joy of being a doctor and a scientist: "I loved taking care of patients and I loved going to the operating room, but I also hate failure. And my own failures in the operating room would lead me to say, 'Let's take this failure up to the laboratory and see if we can't unscramble it, unlock it, and find a way to do it better.' "

So, at age 90, has he replaced a hip?

No, he says, but if he needed to, he'd feel quite relaxed about it. Because he'd know that his new hip could be made of cross-linked polyethylene.

The first version of this story appeared on WBUR's CommonHealth. Carey Goldberg, who covers health and science, is the host of CommonHealth.

Millennials sure do get blamed for a lot. And here's one more thing: According to a new national poll, millennials are the largest generation in the country, but they only account for 20 percent of all blood donations.