Protestant congregations in Germany have also had a sharp decline in attendance numbers, which was among the reasons the Capernaum Church held its final service in 2002, said Susanne Juhl, the last pastor of the congregation.

“It was very difficult for everyone who lives there, who saw their children baptized or confirmed there,” she said in a telephone interview. By the end, she recalled, only about 20 congregants were sitting in pews that had space for 500.

This legacy of decline contributed to Mr. Abdin’s ambivalence about moving into the church. “We wish that churches would become more full,” he said. “We don’t want to Islamize or take over churches.”

In the end, though, he had few other options. Lacking the resources to build a proper mosque, Mr. Abdin had sought to buy other buildings, but was prevented from doing so because of zoning restrictions. Because the Capernaum Church was already designated for religious purposes, no change-of-use permit was necessary. The congregation bought the building in late 2012.

Very few churches in Germany are transformed into mosques. This was the first that belonged to the Evangelical Church, the country’s largest denomination after the Catholic Church, with around 23 million members. While the German Evangelical Church, a federation of Protestant denominations, prohibits the direct sale of its buildings to non-Christian religious groups, Mr. Abdin bought the Capernaum Church from a third-party developer.

During the renovations, which are expected to conclude early next year, Mr. Abdin has tried to respect the building’s history. “The motto for me is: outside church, inside mosque,” he said. The facade will remain largely unchanged, yet the golden cross atop the steeple has been removed and replaced with Arabic lettering spelling Allah, or God.

Inside, the renovations are extensive. “You wouldn’t believe how much work this took,” Mr. Abdin said as he walked across a large empty hall, his footsteps reverberating off the bare concrete floor and vaulted ceiling.