Dr. Joseph Woo loves photosynthesis. And for good reason: Plants may not be as cute as pandas, but it’s thanks to their chemical alchemy that all of us here on Earth are alive and breathing. From microscopic phytoplankton to towering redwoods, these superheroes keep us alive by taking in carbon dioxide and sunlight, then miraculously producing oxygen and sugar.

Related Content The Irish Cardiologist Whose Invention Saved LBJ

But there’s another reason that Dr. Woo loves photosynthesis. When you have a heart attack, there are two things your heart needs immediately to start repairing its damaged tissue: oxygen and sugar. Now Dr. Woo, a professor and heart surgeon at Stanford University, thinks he’s found a way to use some of our tiniest photosynthesizing friends to help our hearts heal themselves.

In a study published this week in Science Advances, Dr. Woo and his team show how they successfully replaced blood with microscopic cyanobacteria, plant-like organisms that also use photosynthesis. By co-opting the process to help heal damaged heart tissue, the team was able to protect rats from deadly heart failure. Fixing an ailing heart, it seems, may be as simple as shining a light on the situation.

Heart attacks strike 735,000 Americans each year, and heart disease is the number one killer worldwide. A heart attack happens when something blocks blood flow to the heart, cutting off oxygen from reaching this crucial muscle. For cardiologists, the challenge for preventing subsequent heart failure is to rapidly supply damaged heart tissues with oxygen and nutrients. But “if you look at nature, photosynthesis answers that question,” says Dr. Jeffrey Cohen, a post-doctoral fellow at Stanford Medicine and lead author on the study.

If a damaged heart were photosynthetic, says Dr. Cohen, it wouldn’t need to rely on blood to resupply oxygen and sugar to its tissues. All it would need was the sun. “You’d enable light to become your fuel source, instead of blood,” Dr. Cohen says. Alas, the heart is not a plant. So researchers tried the next best thing: injecting it with plant-like bacteria.

Dr. Woo and his team started out by trying some familiar, actual plants: “We ground up kale and spinach,” he says. They were trying to separate out the chloroplasts, the photosynthetic organelles within each plant cell, but found that once isolated they quickly became inactive. What researchers needed instead were self-contained photosynthetic machines, which could function as miniature greenhouses for the heart.

Enter cyanobacteria. These tiny organisms make a living by taking in carbon dioxide and water and spitting out oxygen. In the ocean, they’re at the base of the food chain, making the oxygen and sugar that’s quickly exploited by other hungry organisms. “They serve as a lifeline to everything else,” says Adam Martiny, a professor of ecology and evolutionary biology at the University of California at Irvine who studies a common type of cyanobacteria called Synechococcus.

With help from Stanford microbiologists, Dr. Woo and his team grew a strain of Synechococcus in their lab and injected to the impaired heart tissue of a living rat. Then, they turned up the lights. After 20 minutes, they saw increased metabolism in damaged areas. Overall cardiac performance improved after about 45 minutes. The evidence suggested that the oxygen and sugar Synechococcus created through photosynthesis was enhancing tissue repair.

After injecting living bacteria into a body organ, you might expect an infection. But interestingly, the researchers didn’t find any immune response after a week of monitoring. “The bugs are just not there anymore, it disappears,” says Dr. Woo. “And maybe that’s the best kind of bacteria”—a friendly helper that sticks around to do damage control, then disappears without a trace.

One potential problem with making this procedure a viable treatment is its timing and complexity, notes Dr. Morteza Naghavi, Executive Chairman of the Society for Heart Attack Prevention and Eradication in Houston, Texas, who was not involved with the study. Treating heart attacks is a race against the clock, and by the time patients are transferred to a special facility equipped to inject cyanobacteria to the heart, it might be too late. “It requires a tremendous amount of investment and technology,” Dr. Naghavi says.

However, the fact that the researchers still saw healthier hearts in rats that underwent treatment after a month could be a promising result. “If everything goes the way researchers want it, it would be a huge therapy for people who have had [heart attacks],” Dr. Naghavi says. “It’s a wild idea”—but it just might work.

Dr. Woo and his team reason that Synechococcus balances a chemical equation upended by a heart attack. Using light as fuel for food may be a novel concept for a human heart, but it’s old hat for cyanobacteria in their natural habitats.

While Martiny, the environmental microbiologist at Irvine, was impressed by the cardiologists’ ingenuity, the idea of how critical cyanobacteria are to life isn’t a new one. Environmental microbiologists study cyanobacteria like Synechococcus precisely because they so profoundly influence the global environment. “It’s very literal in this case,” he says of the study, “but it’s also quite literal in the ocean, considering that half the oxygen we breathe comes from phytoplankton.”

“It was fascinating that they could use such a tiny organism to clean up the waste in a system,” he adds, referring to how cyanobacteria in the study absorbed the carbon dioxide buildup and used it to photosynthesize, just like in nature. “They provide oxygen there just as they do in the ocean for us to live."

The recent study is merely proof-of-concept, but scientists are now on the path to trying the technique in human subjects. Next they’ll try it in larger animal models that are closer to humans, and they’re working on ways to deliver and shine light on cyanobacteria without an open heart surgery. They’re even considering genetically editing Synechococcus to make the critters release more sugar.

For many cardiologists, the root of the problem lies not in managing heart attacks after they occur, but in preventing them in the first place. “Treating patients after a heart attack like trying to put a lock on a barn after the horses are stolen,” says Dr. Naghavi, pointing out that most treatments only delay eventual heart failure. But given that so many Americans do suffer heart attacks—and will likely continue to do so—developing innovative treatments to help them recover is still worth the effort, says Dr. Cohen.

Even something as unlikely as trying to replace blood using cyanobacteria, he says, could help save lives. The challenge, as he puts it, “is not something I take lightly.”