The FBI foiled an attempted bomb plot and arrested a Syrian refugee on Wednesday who allegedly planned to bomb a church in Pittsburgh in the name of the Islamic State, investigators have revealed.

Mustafa Mousab Alowemer, a 21-year-old Pittsburgh resident who was born in Daraa, Syria, and came to the U.S. as a refugee in 2016, met with an undercover FBI agent and an FBI source posing as ISIS sympathizers several times between April and June, according to the criminal complaint.

He pledged an oath of allegiance to the leader of ISIS in a video he recorded of himself and had been in contact with another ISIS supporter who was also was under investigation, prompting the FBI to look into him.

FEMALE JIHADISTS ARE JUST AS 'MOTIVATED' TO BUILD AN ISLAMIC STATE AS MEN, REPORT CONCLUDES

During these meetings, he allegedly provided details to bomb an unidentified Christian church on the north side of Pittsburgh, producing plot details and bomb materials he purchased along with copies of Google satellite maps that showed the details about the church including its location and various routes for arriving and escaping the premise.

He planned to carry out the attacks in July by setting off the explosives around 3 or 4 a.m., according to the complaint.

Alowemer has been charged with one count of attempting to provide material support to ISIS and two counts of distributing information relating to an explosive device or weapon of mass destruction, activities that the Assistant Attorney General for National Security John Demers called "beyond the pale."

CLICK HERE FOR THE FOX NEWS APP

"Targeting places of worship is beyond the pale, no matter what the motivation," Demers said in a statement.

Less than a year ago, in October 2018, a gunman opened fire inside the Tree of Life synagogue in Pittsburgh, killing 11 people and wounding seven others. The suspect, 46-year-old Robert Bowers, has pleaded not guilty to dozens of charges, including hate crimes and criminal homicide.

The Associated Press contributed to this report.