A Long Beach man pleaded guilty Tuesday to sending payments to suspected members of Islamic State and for illegally possessing a homemade bomb, according to authorities.

Mark Lorenzo Villanueva, 29, pleaded guilty to attempting to provide material support to a foreign terrorist organization and being a felon in possession of a firearm, according to a news release from the U.S. attorney’s office for the Central District of California. Villanueva has been in custody since August.

According to his plea agreement, Villanueva began messaging a person claiming to be an Islamic State fighter living in Syria in February. The person told Villanueva how to send money to him overseas.

Villanueva allegedly sent more than $1,600 knowing it would be spent on ammunition, weapons and other supplies, authorities said. Villanueva also discussed conducting Islamic State operations in the United States.

Law enforcement searched Villanueva’s home in August and found an improvised bomb made with large amounts of ball bearings, nails, screws and other objects, according to the release. The device was not federally registered as required by law.

Villanueva had been convicted of felony stalking in September 2017 and was prohibited from possessing any firearm, according to the release.

He is scheduled to be sentenced June 17 and faces a maximum sentence of 20 years in prison on the charge of trying to provide material support to a foreign terrorist organization, and up to 15 years in prison on the firearm charge.

Sign up for Essential California for news, features and recommendations from the L.A. Times and beyond in your inbox six days a week.

This story originally appeared in Los Angeles Times.