CAIRO, Egypt — An Egyptian court has sentenced 19 Muslim defendants to a one-year suspended sentence for attacking an unlicensed church south of Cairo.

Wednesday’s sentence was handed down in Atfih misdemeanor court. The defendants will not have to serve prison time unless they get into trouble again.

Separately, a Coptic Christian defendant was fined about $20,000 for setting up the unlicensed church.

The incident took place Dec. 22 when dozens of demonstrators gathered outside the building and stormed it. They destroyed the church’s contents and assaulted Christians inside before security forces arrived and dispersed them.

The church in Giza outside the capital Cairo has yet to be sanctioned by the state but has held prayers for 15 years.

The Coptic diocese said it had officially sought to legalize the building’s status under a 2016 law that laid down the rules for building churches.

Local authorities often refuse to give building permits for new churches, fearing protests by Muslim conservatives. That has prompted Christians to illegally build churches or set up churches in other buildings. In contrast, building a mosque results in few restrictions.

Egypt’s Christian minority has often been targeted by Islamic militants in a series of attacks since December 2016 that left more than 100 dead and scores wounded.

The country has been under a state of emergency since April after suicide bombings struck two Coptic Christian churches on Palm Sunday in an attack that was claimed by the Egyptian affiliate of the Islamic State group.

On Dec. 29, a gunman on a motorcycle opened fire outside a church in a Cairo suburb and at a nearby store, sparking a shootout that killed at least nine people, including eight Coptic Christians.

On Jan. 13, gunmen shot dead a Christian man in the turbulent north of the Sinai Peninsula.

The Coptic Orthodox Church in Egypt, with 10 to 15 million followers in the country making up about 10 percent of the population, is the largest Christian minority in the Middle East, and its situation is often considered a bellwether for broader Christian prospects across the region.

Pope Francis has spoken many times for his esteem and concern for the Coptic church in Egypt, most recently expressing his closeness to Pope Tawadros II, leader of the Coptic church, during the celebration of Christmas and congratulating him for the consecration of a new cathedral in Cairo at the close of the pope’s Jan. 6 noontime Angelus address.

Crux staff contributed to this report.