Thanks to the first-ever mind-controlled prosthetic leg, a 32-year-old amputee is one bionic step closer to walking like normal, according to a study published this week.

The prosthetic leg bends and moves much like the average leg. More impressive is the fact that it performs these motions with only the wearer’s thoughts. The test pilot in this case, a software engineer named Zac Vawter, lost his leg in a motorcycle accident a few years ago.

Though mind-controlled prosthetic arms have been successful in people, this is the first such lower limb. Unlike many prosthetics today, like running blades, its movement doesn’t rely on a spring-like response. This allows Vawter to more easily transition between different movements like standing up, walking, or climbing stairs, and improves upon the earlier prototype we covered in November when Vawter used it to climb the 103-story Willis Tower.

The researchers rewired the severed nerves (those connected to muscles below the amputated knee) to Vawter’s still-intact hamstring muscle. This redirected his brain’s movement messages to sensors in the prosthetic. These sensors communicate with a computer to translate the nerve messages to actual movements of the robotic leg.

“When Zac wants to try to move,” Dr. Hargrove said, the brain sends signals down the spinal cord to muscle that hasn’t been damaged. “We have electrodes that are listening to those signals. The algorithm decodes patterns “to figure out what he was thinking,” translating the results into movement such as straightening the knee while sitting or flexing the ankle.

So far the tests have been surprisingly successful, with errors (such as falling) down to a mere 1.8 percent. That’s a huge improvement over the 12.9 percent of conventional robotic prosthetics that electronically assist with movements. The results, published in the New England Journal of Medicine this week, are promising for the thousands of people who are missing the limbs that make them mobile. The mind-controlled leg is expected to hit markets in three to five years.