On March 30, 1981, President Ronald Reagan is shot in the chest outside a Washington, D.C. hotel by a deranged drifter named John Hinckley Jr.

The president had just finished addressing a labor meeting at the Washington Hilton Hotel and was walking with his entourage to his limousine when Hinckley, standing among a group of reporters, fired six shots at the president, hitting Reagan and three of his attendants. White House Press Secretary James Brady was shot in the head and critically wounded, Secret Service agent Timothy McCarthy was shot in the side, and District of Columbia policeman Thomas Delahanty was shot in the neck. After firing the shots, Hinckley was overpowered and pinned against a wall, and President Reagan, apparently unaware that he’d been shot, was shoved into his limousine by a Secret Service agent and rushed to the hospital.

The president was shot in the left lung, and the .22 caliber bullet just missed his heart. In an impressive feat for a 70-year-old man with a collapsed lung, he walked into George Washington University Hospital under his own power. As he was treated and prepared for surgery, he was in good spirits and quipped to his wife, Nancy, ”Honey, I forgot to duck,” and to his surgeons, “Please tell me you’re Republicans.” Reagan’s surgery lasted two hours, and he was listed in stable and good condition afterward.

READ MORE: How McKinley’s Assassination Spurred Secret Service Presidential Protection

The next day, the president resumed some of his executive duties and signed a piece of legislation from his hospital bed. On April 11, he returned to the White House. Reagan’s popularity soared after the assassination attempt, and at the end of April he was given a hero’s welcome by Congress. In August, this same Congress passed his controversial economic program, with several Democrats breaking ranks to back Reagan’s plan. By this time, Reagan claimed to be fully recovered from the assassination attempt. In private, however, he would continue to feel the effects of the nearly fatal gunshot wound for years.

Of the victims of the assassination attempt, Secret Service agent Timothy McCarthy and D.C. policeman Thomas Delahanty eventually recovered. James Brady, who nearly died after being shot in the eye, suffered permanent brain damage. He later became an advocate of gun control, and in 1993 Congress passed the “Brady Bill,” which established a five-day waiting period and background checks for prospective gun buyers. President Bill Clinton signed the bill into law.

After being arrested on March 30, 1981, 25-year-old John Hinckley was booked on federal charges of attempting to assassinate the president. He had previously been arrested in Tennessee on weapons charges. In June 1982, he was found not guilty by reason of insanity. In the trial, Hinckley’s defense attorneys argued that their client was ill with narcissistic personality disorder, citing medical evidence, and had a pathological obsession with the 1976 film Taxi Driver, in which the main character attempts to assassinate a fictional senator.

His lawyers claimed that Hinckley saw the movie more than a dozen times, was obsessed with the lead actress, Jodie Foster, and had attempted to reenact the events of the film in his own life. Thus the movie, not Hinckley, they argued, was the actual planning force behind the events that occurred on March 30, 1981.

The verdict of “not guilty by reason of insanity” aroused widespread public criticism, and many were shocked that a would-be presidential assassin could avoid been held accountable for his crime. However, because of his obvious threat to society, he was placed in St. Elizabeth’s Hospital, a mental institution. In the late 1990s, Hinckley’s attorney began arguing that his mental illness was in remission and thus had a right to return to a normal life.

Beginning in August 1999, he was allowed supervised day trips off the hospital grounds and later was allowed to visit his parents once a week unsupervised. The Secret Service voluntarily monitored him during these outings. In 2016, he was given a conditional release to move in with his mother in Williamsburg, Virginia. In 2018, a judge ruled he can now live within 75 miles of Williamsburg, provided he meets regularly with his psychiatrist and social worker, among other conditions.