KEY WEST, Fla. – A man convicted in January of plotting to detonate a bomb at a Florida Keys beach was sentenced Tuesday to life in prison.

Harlem Suarez, 26, was convicted Jan. 27 of attempting to use a weapon of mass destruction and providing material support to a terrorist organization.

U.S. District Judge Jose E. Martinez sentenced Suarez to life in prison for the weapon of mass of mass destruction count of conviction and a concurrent term of 20 years in prison for attempting to provide material support to a terrorist organization.

Suarez had previously rejected a plea deal for 20 years in prison at the urging of his mother.

Dozens of friends, relatives and co-workers wrote the court asking for leniency, as Suarez has no previous criminal history and a psychiatric evaluation found him to be gullible and easily swayed.

The judge openly struggled with trying to figure out whether Suarez was a lone wolf who was loyal to ISIS, or a misguided person trying to belong to something big.

Federal prosecutors argued that however naive or inept Suarez might be, the intent was there and his actions might have been catastrophic.

According to a criminal complaint, Suarez, who is also known as Almlak Benitez, caught the attention of the FBI in April 2015 after posting extremist rhetoric and promoting the Islamic State group through posts on his Facebook page.

Last spring, a Facebook user called the Palm Beach County Sheriff's Office to report seeing messages from an ISIS recruiter. FBI agents traced the posts to Suarez and said they found a trove of ISIS-related postings.

One post read: "Stand up with us my brother. Stand up with the black flag and the AK with 10 mag, fight with us, be a gangster with us, kill our enemies and convert to Islam now in USA."

File: Harlem Suarez sentencing request

The FBI put a confidential informant on the case. Agents said Suarez plotted with that informant to make a "timer bomb" and planned to test his explosives in the garage under his parents' apartment.

According to the complaint, Suarez ordered AK-47s online that were to be delivered to a Key West pawnshop, where he intended to pick them up. Employees at the pawnshop also alerted the FBI.

The complaint said Suarez created an ISIS recruiting video inside a Homestead motel.

The script for the video, according to the complaint, was: "I call to other brothers worldwide to create Caliphate in the Middle East. Destroy our enemies against us. Let live only who are our brothers and sisters. Send our mujahideen to a different soil with tanks, missiles grenades and other tactical needs. America soil is the past, we will destroy America and divide it in two. We will raise our black flag on top of your white house and any president on duty (cut head)."

The complaint said Suarez had planned other attacks before deciding to bomb a Key West beach, including a Fourth of July attack in South Beach or in Marathon.

Investigators said Suarez later decided to bury the bomb at a public beach in Key West and detonate it using a cellphone. He met with an informant at the motel and showed him the homemade bomb before being taken into custody, the complaint said.