Washington (AFP) - John Hinckley, who tried to assassinate president Ronald Reagan 35 years ago, is to be freed from a psychiatric hospital to live full-time with his mother, a federal judge ordered Wednesday.

Hinckley, who was declared not guilty of the attempted assassination on grounds of insanity, said after shooting the president outside a Washington hotel that he wanted to kill Reagan to impress the actor Jodie Foster, with whom he became obsessed after viewing the film "Taxi Driver."

The court order places dozens of detailed conditions on Hinckley's "full-time convalescent leave" from St. Elizabeths Hospital in Washington, including a ban on contact with Foster, but said they can be phased out after a year to 18 months if he continues to make progress.

US District Judge Paul Friedman wrote that Hinckley, 61, no longer poses a threat to himself or others.

He will be freed as soon as August 5 to live with his 90-year-old mother in her gated community in Williamsburg, Virginia.

"Contrary to the judge's decision, we believe John Hinckley is still a threat to others and we strongly oppose his release," the Ronald Reagan Presidential Foundation and Institute said in a statement.

The attack badly wounded three other men, including Reagan press secretary James Brady.

Following a two-month trial in 1982, a federal jury found Hinckley not guilty by reason of insanity. The widely criticized verdict led many states to tighten the laws on insanity defenses.

Since the 1990s, Hinckley has been permitted gradually longer supervised home visits with his mother, lately lasting up to 17 days. Secret Service agents have tracked him during each such foray.

- Reagan family opposition -

Members of Reagan's family have consistently opposed Hinckley's release. Daughter Patti Reagan Davis wrote on her website in 2015 that "I hope the doctors are right when they say that John Hinckley isn't a danger to anyone, but something in me feels they are wrong."

Story continues

One thing troubling her, she said, was that while at St. Elizabeths, Hinckley had written to the mass murderers Ted Bundy and Charles Manson.

But Hinckley attorney Barry Levine has argued since 2003 that evaluations by the hospital's officials showed that he no longer posed any threat.

The attempt on Reagan's life sparked intense debate over gun violence and the treatment of the mentally ill. Brady, though left paralyzed, became a leading gun-control advocate.

A medical examiner attributed Brady's death in 2014 to the injuries received 33 years earlier, but no additional charges were filed against Hinckley.

The 1981 attack also badly wounded US Secret Service agent Tim McCarthy and local police officer Thomas Delahanty.

The conditions on Hinckley's release include a ban on contact with survivors of any of the victims, as well as with Foster.

Hinckley must remain within 50 miles of his mother's home, and cannot travel to any area where a current or former president, vice president or member of Congress is known to be.

He must return to St. Elizabeths for monthly monitoring and must notify the Secret Service in advance about his intended route of travel.

He cannot post any writings or memorabilia on the internet or display them in person without authorization.

The detailed conditions even include a requirement for monthly music therapy sessions with a board-certified music therapist.

St. Elizabeths, Hinckley's home for most of the past 35 years, opened in 1855, the first federally run psychiatric hospital. Though it once housed as many as 8,000 patients -- many of them indigent -- the aging facility is being phased out and now holds only a few hundred.