A Syrian man has been arrested by the FBI in Pittsburgh for allegedly planning an attack on a Pittsburgh church.

>> Read more trending news

Police and federal agents spent the entire day Wednesday at the Northview Heights housing complex but remained tight-lipped about their investigation until just before 5 p.m.

Mustafa Mousab Alowemer, 21, was arrested and charged with one count of attempting to provide material support and resources for ISIS and two counts of distributing information relating to an explosive, destructive device, or weapon of mass destruction.

“The defendant is alleged to have plotted just such an attack of a church in Pittsburgh in the name of ISIS," Assistant Attorney General for National Security John C. Demers said in a release.

According to the FBI's counterterrorism department, Alowemer planned to bomb a church at 2131 Wilson Avenue in Pittsburgh's Perry South neighborhood. He identified the church as Christian and Nigerian, and said he targeted it to "take revenge for our [ISIS] brothers in Nigeria."

He allegedly distributed plans for how to make improvised explosive devices to a person he believed to be a fellow ISIS supporter, but was actually an FBI employee.

Earlier this month, Alowemer allegedly bought items needed to construct bombs, including acetone, 9-volt batteries, ice packs and nails.

The DOJ says he recorded a video of himself pledging an oath of allegiance to ISIS leader Abu Bakr Al-Baghdadi.

Between April 16 and June 11, Alowemer met people working for the FBI four times. During those meetings he talked about his plan and shared detailed maps about the target, including handwritten notes identifying the church and possible routes of arrival and escape.

Alowemer said he planned to deliver the bomb in a backpack for an attack in July.

The FBI said Alowemer was born in Syria in 1998, and in 2016 he came to the United States as a refugee. He recently graduated a Pittsburgh high school.

Last year he began contacting a woman who pledged herself as an ISIS supporter. She allegedly shared information on social media about how to make explosives and biological weapons. Earlier this year, this woman pleaded guilty in federal court in Wisconsin to providing material support to ISIS.