Kerry Kennedy leaves Westchester County courthouse Wednesday, Feb. 26, 2014, in White Plains, N.Y. Kennedy testified at her drugged-driving trial Wednesday that she has no memory of swerving and hitting a tractor-trailer on a suburban New York highway and did not realize she was impaired when she got behind the wheel. (AP Photo/Frank Franklin II)

Kerry Kennedy leaves Westchester County courthouse Wednesday, Feb. 26, 2014, in White Plains, N.Y. Kennedy testified at her drugged-driving trial Wednesday that she has no memory of swerving and hitting a tractor-trailer on a suburban New York highway and did not realize she was impaired when she got behind the wheel. (AP Photo/Frank Franklin II)

Buy AP Photo Reprints

WHITE PLAINS, N.Y. (AP) â€” Kerry Kennedy was acquitted Friday of drugged driving after she accidentally took a sleeping pill and then sideswiped a truck in a wild highway drive she said she didn’t remember.

Kennedy hugged and clasped hands with her lawyers as a six-person jury cleared her of driving while impaired, a misdemeanor. It had carried the potential for up to a year in jail, though that would be unlikely for a first-time offender.

A human-rights advocate, Kennedy is a scion of one political dynasty â€” a daughter of Sen. Robert F. Kennedy and niece of President John F. Kennedy â€” and a onetime member of another, as the former wife of New York Gov. Andrew Cuomo. Her 85-year-old mother, Ethel Kennedy, and other members of their famous family attended the trial, which drew so much attention that it was moved from a small-town courtroom to a bigger courthouse in White Plains.

Prosecutors and Kennedy’s defense lawyers agreed the 54-year-old took the sleeping drug zolpidem unintentionally, mistaking it for her daily thyroid medication, before heading off to her suburban New York gym on July 13, 2012. The trial centered on whether or not she realized she was impaired and should have stopped.

Despite the pill mix-up, “she is responsible for the chain of events that happened after that,” prosecutor Doreen Lloyd said in her summation. She argued that Kennedy shrugged off the symptoms because she was busy.

Kennedy’s defense said what happened was an accident, not a crime.

Kennedy said she didn’t remember anything that happened as she drove her Lexus on a New York interstate â€” swerving out of her lane, hitting a tractor-trailer, blowing a tire and continuing to the next exit, where she was found disoriented and slumped at the steering wheel, according to witnesses. Police said she failed several sobriety tests at the scene but passed several tests a few hours later at a police station.

“If I realized I was impaired, I would have pulled over,” Kennedy testified.

A few days later, Kennedy said her doctors believed it was caused by a seizure, stemming from a brain injury early in her life. Then blood tests found a small amount of zolpidem, sometimes sold under the brand name Ambien.

Kennedy’s defense introduced a medical journal article saying that people who take zolpidem frequently don’t recognize their impairment, and even the prosecution’s toxicology expert acknowledged the medication could lead to someone “sleep-driving” without knowing it. Kennedy’s lawyer, Gerald Lefcourt, said the drug “hijacks your ability to make decisions.”

But the prosecutor said Kennedy’s testimony contradicted science showing the drug works gradually. And Lloyd spotlighted Kennedy’s shifting explanations of the episode, suggesting Kennedy was worried about her image.

Her family’s storied and sorrow-filled history crept into the trial when Lefcourt asked about her upbringing.

“My mother raised us because my father died when I was 8,” she said. “He was killed when he was running for president.”

But Lefcourt told jurors in his closing argument that Kennedy was “not seeking advantage because of her family.”

The trial, he noted, was “not a TV call-in program. This is an American court.”