Washington (CNN) The FBI on Wednesday arrested a 21-year-old Syrian refugee living in Pittsburgh, accusing him of planning to bomb a church in the name of ISIS .

Mustafa Mousab Alowemer, who was admitted into the country as a refugee in 2016, bought bomb-making materials and cased escape routes from the church, according to a criminal complaint.

Alowemer also shared marked-up satellite maps of the area around the building and a multi-point plan for the attack he'd written out by hand with an FBI informant and undercover agent, the complaint says.

Alowemer's arrest comes as ISIS' territory in the Middle East has been virtually eliminated , and the pace of arrests in the US of people inspired by the group to attack has also slowed.

President Donald Trump made blocking refugees and immigration from Syria and other terror-prone countries a major initiative as he campaigned for the White House ahead of the 2016 election. His travel ban was eventually upheld by the Supreme Court , which deferred to the President's national security powers.

Alowemer is one of a small number of refugees who have been prosecuted in the US on charges related to ISIS, according to Seamus Hughes, a researcher from George Washington University's Program on Extremism, which tracks terror cases.

Two refugees from Iraq were arrested in 2016 on charges related to ISIS, and in 2015, a husband and wife who had come to the US as refugees from Bosnia were charged with attempting to provide material support to the terror group.

According to the complaint, Alowemer was motivated to detonate a device at the church "to support the cause of ISIS and to inspire other ISIS sympathizers in the United States to join together and commit similar acts."

Alowemer also said he wanted to target the church, which he described as being Christian and Nigerian, to "take revenge for our (ISIS) brothers in Nigeria," the complaint says.

Earlier this month, Alowemer bought batteries, nails and other household materials that he planned to use to build an explosive device, the complaint says.

The FBI began tracking one of Alowemer's social media accounts in April 2018. According to the complaint, he was a prolific consumer of online ISIS propaganda and communicated with another person who had pledged support to ISIS and was known to distribute bomb-making instructions online.

Alowemer also exchanged messages with an undercover FBI agent he believed was an ISIS supporter, asking him for a "weapon with a silencer" and sharing a video he'd made pledging allegiance to ISIS' leader.

Alowemer is due in federal court for his first appearance on Friday. He did not have an attorney immediately listed.