Two monkeys with tiny sensors in their brains have learned to control a mechanical arm with just their thoughts, using it to reach for and grab food and even to adjust for the size and stickiness of morsels when necessary, scientists reported on Wednesday.

The report, released online by the journal Nature, is the most striking demonstration to date of brain-machine interface technology. Scientists expect that technology will eventually allow people with spinal cord injuries and other paralyzing conditions to gain more control over their lives.

The findings suggest that brain-controlled prosthetics, while not practical, are at least technically within reach.

In previous studies, researchers showed that humans who had been paralyzed for years could learn to control a cursor on a computer screen with their brain waves and that nonhuman primates could use their thoughts to move a mechanical arm, a robotic hand or a robot on a treadmill.