Jaws dropped when John F. Kennedy Jr. walked into a Palm Beach County, Fla., courtroom to support his cousin William Kennedy Smith in 1991.

Though many members of the Kennedy family had come forward, the presence of John — then a Manhattan assistant district attorney — generated a media frenzy with headlines around the world. John, however, wasn’t at the trial of his own free will, claims a new book: He was being blackmailed into supporting William, who was acquitted of rape at the end of the 10-day trial.

jfk jr. and william kennedy smith

JFK Jr. and William Kennedy Smith in October 1991.

This bombshell revelation appears in RFK Jr.: Robert F. Kennedy Jr. and the Dark Side of the Dream, in which author Jerry Oppenheimer quotes the 1993 sworn testimony of James Ridgway de Szigethy, an acquaintance of John’s, who says they discussed his appearance at the Smith trial to show support for his family.

RELATED: Never-Before-Seen Kennedy Family Photos to Hit the Auction Block — See the Pics!

John told him “he would have to put in an appearance in the courtroom. He told me he did not want to do this and his mother did not want him to, either. But he told me who was pressuring and why.”

RELATED: Kennedy Family’s Palm Beach Compound Sells for $31 Million

John was particularly distressed about attending the trial because he felt Smith was guilty, writes Oppenheimer. On March 30, 1991, after a night of hard drinking with his uncle Ted Kennedy and cousin Patrick, Smith met 29-year-old Patricia Bowman, whom he was later accused of raping on the beach in front of the Kennedy mansion.

To read the full story on the Kennedy Family, pick up the new issue of Closer Weekly, on newsstands now!