Scientists inspired by the movie “Avatar” have demonstrated that one monkey can use his thoughts to control the movements of a second, sleeping monkey.

Researchers at Harvard Medical School said the lab experiment could pave the way to paralyzed people regaining control of their own body.

In the experiment, the brain of one Rhesus monkey – designated the “master” – was wired to the spinal cord of a sedated second Rhesus monkey, who was called “the avatar.”

The master sat in a chair before a computer screen that showed a cursor and a green circle that alternated between two spots.

The avatar was in a separate room with its arm strapped to a 360-degree joystick that allowed him to move the cursor on the screen.

When the master thought of moving the cursor, its brain signals were decoded by a computer to determine which of the two targets it had in mind. The data was relayed to the avatar’s spinal cord.

If the avatar hit the right target, the master was rewarded with a squirt of juice.

It worked: In 98 percent of the tests, the master’s thoughts got the sedated monkey to hit the target.

The experiment, published in the journal Nature Communications, was described as “a key step forward.”

When a person is paralyzed, damage to the spinal cord prevents his brain from sending vital communication to his body. The new research indicates that an implant chip in the brain can open a new path to the body, allowing the a paralyzed person to walk once again.

“I was inspired a little by the movie ‘Avatar,’” said one of the Harvard researchers, Ziv Williams.

In the blockbuster 2009 movie a paraplegic main character regains control of his body with the help of a computer.

University of Warwick biomedical engineering professor Christopher James said the findings had “profound implications… for controlling limbs in spinal cord injury, or controlling prosthetic limbs with limb amputees.”