Scientists have designed a brain implant that restored lost memory function and strengthened recall of new information in laboratory rats — a crucial first step in the development of so-called neuroprosthetic devices to repair deficits from dementia, stroke and other brain injuries in humans.

Though still a long way from being tested in humans, the implant demonstrates for the first time that a cognitive function can be improved with a device that mimics the firing patterns of neurons. In recent years neuroscientists have developed implants that allow paralyzed people to move prosthetic limbs or a computer cursor, using their thoughts to activate the machines. In the new work, being published Friday, researchers at Wake Forest University and the University of Southern California used some of the same techniques to read neural activity. But they translated those signals internally, to improve brain function rather than to activate outside appendages.

“It’s technically very impressive to pull something like this off, given our current level of technology,” said Daryl Kipke, a professor of bioengineering at the University of Michigan who was not involved in the experiment. “We are just scratching the surface when it comes to interacting with the brain, but this experiment shows what’s possible and the great potential of interacting with the brain in this way.”

In a series of experiments, scientists at Wake Forest led by Sam A. Deadwyler trained rats to remember which of two identical levers to press to receive water; the animals first saw one of the two levers appear and then (after being distracted) had to remember to press the other lever to be rewarded. Repeated training on this task teaches rats the general rule, but in each trial the animal has to remember which lever appeared first, to inform the later choice.