VENICE, Italy — The 18th-century novelist William Beckford wrote that he couldn’t help thinking of this city’s most beloved sight, St. Mark’s Basilica, as a mosque, with its “pinnacles and semicircular arches” all “so oriental in appearance.” But despite the profound stamp that Islamic culture has left on Venice’s art and architecture over centuries, it remains one of the few prominent European cities without a mosque near its historic center, leaving Islamic residents who work there to pray in storerooms and shops amid the tourist crush.

For the next seven months, however, Venice will find itself in the middle of the roiling debate about Islam’s place in Europe. On Friday, as part of the Venice Biennale, a former Catholic church in the Cannaregio neighborhood will open its doors as a functioning mosque, its Baroque walls adorned with Arabic script, its floor covered with a prayer rug angled toward Mecca and its crucifix mosaics hidden behind a towering mihrab, or prayer niche.

The transformation is the work of a Swiss-Icelandic artist, Christoph Buechel, who has become known for politically barbed provocations. But the mosque, which will serve as Iceland’s national pavilion during the Biennale, is a cultural symbol and a kind of ready-made sculpture conceived with the active involvement of leaders of the area’s Islamic population, which has been growing for many years.

Against a backdrop of rising Islamophobia in Italy and fears, like those at full throttle in France, of terrorism committed in the name of Islam, Muslim leaders in Venice said they saw the proposal to create a temporary mosque in the international spotlight of the Biennale as a perfect way to communicate their desire to more fully participate in the life of their city.

“Sometimes you need to show yourself, to show that you are peaceful and that you want people to see your culture,” said Mohamed Amin Al Ahdab, president of the Islamic Community of Venice, which represents Muslims of about 30 nationalities living in greater Venice.

While a large Islamic center serves as a mosque in Marghera, a part of the city on the mainland where many Muslims live, Ahdab said it had been a dream of longtime residents like himself to have a mosque in Venice’s historic center. (The closest thing to one existed in the 17th and 18th centuries in the Fondaco dei Turchi, a building along the Grand Canal that served as a ghetto for the city’s Ottoman Turkish population.)

“There are many Muslims who commute in to work, and they don’t have a good place for prayer,” said Ahdab, a Syrian-born architect who has lived in Venice since 1984. “And there are tens of thousands of Muslim tourists coming through Venice every month, who wonder why there is no mosque, in a city where you can see Islamic history with your eyes.”

Reminders of Venice’s history of mercantile and cultural commerce with the Islamic world are indeed everywhere. Buechel notes that the first mechanically printed Quran is believed to have been produced in Venice, by Paganino and Alessandro Paganini in the 16th century, as a commercial venture aimed at the Ottoman market. (Buechel has printed his own version of this Quran for the mosque project, in an edition of 1,001 copies to nod to the “Arabian Nights,” whose tales were first popularized not by Islamic scholars but by a Frenchman, Antoine Galland.)

But despite the city’s connection to the East and Venice’s relatively tolerant attitude toward immigrants, contemporary Venetians have been wary about a more visible presence of Islam. A proposal by Qatar to help build a museum of Islamic art and history in a palazzo near the Rialto Bridge has been met with opposition, vocally so by the right-wing, anti-immigrant Northern League party, whose leader vowed to occupy the space proposed for the museum to prevent its construction.

Buechel, 48, is a famously combative artist who has specialized in hyper-real installations that often lay bare the art world’s hypocrisies and political contradictions (he once built a working community center, with classes for the elderly, inside an elegant London gallery). In an interview, he said he wanted a church to host the mosque in order to create a quintessentially Venetian layering of cultures. But he spent months with no luck trying to find a willing partner for “The Mosque: The First Mosque in the Historic City of Venice,” as the project is titled. He was finally able to rent a small Catholic church, Santa Maria della Misericordia, that has not been used for worship for more than 40 years and is now owned by a lighting company. But his real difficulties in creating the project began only then.

In meetings with Venetian leaders, the police and officials of the Biennale, Buechel was told that he would not be allowed to make temporary changes to the church’s exterior, including a bas-relief he had planned near the entrance that would have said “Allahu akbar” (or “God is great”) in Arabic script.

The project came close to collapsing in mid-April, after Venetian officials sent a letter to the Icelandic Art Center, which is organizing the pavilion, with warnings that the police considered the mosque a security threat. In the letter, police officials said the mosque’s site, along a canal near a small footbridge, would be too hard to monitor and that such surveillance was necessary in light of “the current international situation and the possible risks of attack by some religious extremist.” Officials of the Biennale have also kept their distance from the project. (Biennale representatives did not respond on Wednesday to requests for comment.)

But Buechel and the project’s curator, Nina Magnúsdóttir, in consultation with lawyers, decided to continue building. And as of Wednesday, two days before a dedication ceremony that is expected to include Friday prayers by dozens of worshipers, it appeared almost ready to open, with a worker hanging blown-glass mosque lamps and a painter adding final touches to the faux-marble mihrab. Hamad Mahamed, a local imam who has been involved in the planning and will serve as the mosque’s leader, arrived that afternoon and led prayers for a small group of Muslim men who were there to help.

“It’s important for us to do this,” Mahamed said, “to show people what Islam is about, and not what people see in the media.” He added that the mosque’s incarnation inside a Christian church did not trouble him — he cited traditional stories of the Prophet Muhammad allowing Christian travelers to worship in his mosque in Medina — and he hoped it would not trouble others.

Some Venetian observers predicted that it might not. Bruce Leimsidor, a professor of immigration and asylum law at Ca’ Foscari University in Venice, said: “I think if you really wanted to pour salt in the wounds you would do something like this in Rome or Milan, where anti-Islamic feelings run much higher. But Venice is without a doubt the most tolerant city in Italy and proud of it, and so I think it’s the wrong place to make this kind of statement.”

Buechel said he had seen little evidence of such tolerance in his dealings with the city over the mosque. And he added that he believed Venice was the right place for it because it is one of the premier tourist-driven showplaces of European culture, never more so than during the Biennale, whose contradictions he hopes the mosque will illuminate, along with a growing social crisis facing Europe.

“Venice has always been a town of trade, and it is still to this day,” he said. “Right now the business is art, and if you do anything to upset that business, they will try to stop you any way they can.”