John W. Hinckley Jr., who spent more than 35 years in a psychiatric hospital following his attempt to assassinate President Reagan in 1981, will be released into his mother's care as early as next month under a federal court order.

In a 103- page court order, U.S. District Judge Paul L Friedman of Washington writes that Hinckley, 61, no longer poses a danger to himself or others. He could be freed as soon as Aug. 5.

If he adheres to strict guidelines regarding his activities, Hinckley could be fully removed from court control in as soon as a year.

Hinckley, who shot President Reagan and three others outside the Washington Hilton hotel on March 30, 1981, was found not guilty by reason of insanity at a 1982 trial and ordered confined for treatment at St. Elizabeth's Hospital in Washington, D.C.

The release, cast as "convalescent leave," is subject to strict guidelines. He must live at his mother's home in Williamsburg, Va., and is restricted to a 50-mile radius of the location. He must inform his doctors before going to any private residence.

He must also turn over information about his mobile phone and vehicles he will be driving, and is barred from accessing social media, uploading any content or erasing any browser history from his computer.

He must undergo treatment at St. Elizabeth's Hospital no less than once a month. For each visit, the U.S. Secret Service will provide Hinckley's time of departure from Williamsburg as well as the intended travel route two weeks in advance, the court says. Hinckley can make the trip unaccompanied.

The court order requires that Hinckley "shall have no contact whatsoever" with specific individuals, including actress Jodie Foster. In a letter to the actress written on the eve of the assassination attempt, Hinckley displayed an obsession with Foster and emphasized that his act was an attempt to impress her.

Foster played a child prostitute in the 1976 film Taxi Driver, which focuses on a disturbed character based in part on the diaries of Arthur Brmer, who tried to kill Geroge Wallace.

The court order also says he is barred from communicating with members of Reagan's family, or any member of the family of James Brady, Reagan's then-press secretary who was wounded in the assassination attempt.

The court order further says Hinckley must participate in "structured activities" in Williamsburg, such as volunteer positions or paid employment approved by his doctors.

In addition, Hinckley must adhere to strict guidelines regarding the media. "If approached by media, Mr. Hinckley and the members of his family will decline to speak with them, and if the media persists, Mr. Hinckley and the members of his family will withdraw," the order says.