A federal judge tossed a lawsuit against Hillary Clinton by the parents of two Americans killed at a diplomatic compound in Benghazi, Libya, ruling Friday the former secretary of state did not defame them when disputing allegations that she had lied.

"The untimely death of plaintiffs' sons is tragic, and the Court does not mean to minimize the unspeakable loss that plaintiffs have suffered in any way," U.S. District Judge Amy Berman Jackson in Washington wrote in a 29-page opinion.

The suit also alleged Clinton’s use of a private email server caused the death of their sons, Sean Smith and Tyrone Woods, because it exposed terrorists to sensitive information. They claimed Clinton lied when she allegedly told them it was a YouTube video that prompted the consulate attack.

Berman ruled the parents didn't sufficiently challenge that Clinton was not acting in her official capacity when she used the private server, and that the families didn't put forward appropriate claims that Clinton defamed them or put them in a false light.

One of the parents, Patricia Smith, gave an emotional speech during the 2016 Republican National Convention against Clinton. Her son and Woods were killed in the September 2012 attack, along with CIA operative Glen Doherty and the U.S. ambassador to Libya, Christopher Stevens.

Clinton's homebrew server bedeviled her campaign before it officially began. Emails later released under the Freedom of Information Act showed some contained classified information, although they were not marked as such at the time.

The Associated Press contributed to this report.