Cesar Sayoc sentenced to 20 years in prison for mailing pipe bombs to prominent Democrats, CNN

Cesar Sayoc, 57, pleaded guilty to 65 counts in federal court earlier this year.

A Manhattan federal court judge spared Cesar Sayoc of Florida a life sentence for mailing 16 pipe bombs to prominent Democratic politicians and media figures across the country.

Sayoc was sentenced by U.S. District Court Judge Jed Rakoff to 20 years in a federal prison with five years supervised release where he must participate in out-patient drug and mental health treatment.

As Rakoff read his decision, Sayoc placed his head down on the defense table and sobbed into his hands. He then gestured a cross with his right hand, lifted his head to the ceiling and mouthed, "Thank you."

After a 90-minute sentencing hearing that included testimony from two doctors about Sayoc's state-of-mind, the judge determined a life sentence was "inappropriate" and a 10-year mandatory minimum was not enough. Prosecutors recommended a life sentence plus 10 years to set an example.

Although none of the homemade devices went off, it triggered a nation-wide manhunt involving hundreds of investigators with the FBI and U.S. Postal Service.

"Saying this is a hoax ... minimized the national threat," said Assistant United States Attorney Jane Kim.

Investigators identified the former exotic dancer as the sender after finding a fingerprint on one of the packages sent to California Rep. Maxine Waters that matched fingerprints provided from a previous arrest.

Sayoc, 57, was arrested on Oct. 26 in the parking lot of an Autozone in Plantation, Florida, about 20 miles northwest from his home in Aventura.

Sayoc pleaded guilty in March to 65 counts, including using a weapon of mass destruction, interstate transportation of an explosive, conveying a threat in interstate commerce, illegal mailing of explosives with intent to kill or injure another and carrying an explosive during the commission of a felony.

"In this court's view, this sentence is no more nor no less than he deserves," the judge said.

Sayoc prepared a handwritten statement that he repeatedly combed through during the proceeding.

"I am beyond very sorry for what I did," Sayoc read as he followed his writing with his index finger. "I have had major tragedies in my life that had a severe effect in my future. ... Now being sober, I cannot believe what I wrote online. ... I should have listened to my mother, who is the love of my life, to get help."

Sayoc's mother and sister were present in court.

Sayoc's attorney, federal public defender Ian Marcus Amelkin, said his client suffered from mental illness, dyslexia, was sexually abused by a priest for a year and started using steroids at the age of 15.

"These are profound effect of his life,” the defense lawyer said. "These things really mess with your brain."

But after reading books by Trump, he "resonated" with the businessman and reality TV star president. Sayoc "became obsessed with Donald Trump, saw him as a father figure," Amelkin said, and "started buying Trump suits and ties."

Inside the van, FBI agents seized a laptop that contained lists of physical addresses that matched many of the labels on the envelopes he mailed.

"We believe the president's rhetoric contributed to Mr. Sayoc's behavior," said Amelkin.

Sayoc was a fanatic of President Trump's social media accounts and subscribed to right-wing Facebook groups and their followers, which "promoted various conspiracy theories, and more generally, the idea that Trump’s critics were dangerous, unpatriotic, and evil," according to court documents filed by the defense.

The prosecutor said Sayoc "set out to silence people who had beliefs he did not believe it."

The judge said Sayoc "hated his victims, but did not wish them dead."

ABC News' Jack Date and Josh Margolin contributed to this report.