The man accused of sending pipe bombs to prominent critics of President Donald Trump was ordered held without bail after his first court appearance in New York on Tuesday.

Cesar Sayoc, who was transferred from federal custody in Florida, hugged his lawyer after a hearing in which Assistant U.S. Attorney Jane Kim called him “a serious risk of danger to the public and a flight risk.”

Sayoc has been accused of sending improvised explosive devices to numerous Democrats, Trump critics and media outlets in a scare that heightened tensions before the crucial midterm elections Tuesday. None of the devices exploded, and no one was injured in the pipe bomb scare.

He was arrested outside a South Florida auto parts store. He was living in a van covered with stickers of Trump and showing images of some of the president’s opponents with red crosshairs over their faces.

Sayoc faces nearly 50 years in prison if convicted on five federal charges that were filed in New York because some of the devices were recovered there.

Assistant Federal Defender Sarah Baumgartel declined to comment after the hearing, in which Sayoc presented himself as polite and soft-spoken and responded “Yes, sir” to the judge’s questions. He wore navy blue jail scrubs and a gray pony tail.

At one point during the hearing, which lasted less than 10 minutes, Sayoc told U.S. Magistrate Judge Robert Lehrburger that he understood his rights “100 percent.” He appeared taken aback, however, when Lehrburger noted that Sayoc is charged with assaulting federal officials, among other counts.

His lawyers decided not to seek his release on bail after prosecutors released a letter outlining more evidence against him, including DNA linking him to 10 of the explosive devices and fingerprints on two of them.

Other evidence includes online searches Sayoc did on his laptop and cellphone for addresses and photos of some of his intended targets, which included former President Barack Obama, former Secretary of State Hillary Clinton, former Vice President Joe Biden, California Sen. Kamala Harris and New Jersey Sen. Cory Booker. Packages were also mailed to CNN in New York and Atlanta.

Prosecutors say the most recent crude bomb was recovered Friday in California, addressed to the liberal activist Tom Steyer.

Sayoc is scheduled to return to federal court Monday for a preliminary hearing.

While Sayoc’s attorneys have not commented on his mental health, his mother wrote a letter to ABC News saying he has suffered from mental illness for years.

“While I have not lived with my son for 35 years or even heard from him in over four years, I cannot express how deeply hurt, sad, shocked and confused I am to hear that my son may have caused so many people to be put in fear for their safety,” Madeline Sayoc wrote in the letter, according to ABC News. “This is not how I raised him or my children."