Hamburg may soon become the first German state officially to recognize Islam as a religious community and give Muslims the same legal rights as Christians and Jews in dealing with the local administration.
Four years of quiet negotiations about building mosques, opening Muslim cemeteries and teaching Islam in public schools are nearing an end just when Germany is embroiled in a noisy debate about Islam and the integration of Muslim immigrants.
The deal seems set to go through, but the national debate on Islam and local political changes could make its approval more difficult than expected, politicians and Muslim leaders said.
"It's important for us that this agreement makes clear that we are part of this society," said Zekeriya Altug, chairman of the Hamburg branch of DITIB, a Turkish-German mosque network that is one of Germany's largest Muslim organisations.
"We're close to wrapping this up," said Norbert Mueller, a German convert who is a board member of Schura, the largest mosque association in this north Germany port city.
Germany has about 4 million Muslims, mostly of Turkish origin, in its 82 million population. Long treated as migrant workers due eventually to return to their countries of origin, they are now an established minority that wants equal rights.
The agreement in Germany's second-largest metropolis, a city-state in the country's federal system, would set out their rights and also their duties, such as consulting neighbourhood residents before building mosques or erecting minarets.
Mr. Altug said many rights were already allowed under various German laws, or granted as local exceptions. "This agreement should bring all this together in a single text," he said.
Equal status with Christians and Jews could be more controversial when the agreement comes up for discussion in the local assembly for Hamburg, a traditionally Lutheran city where Muslims make up about 5 per cent of the 1.7 million population.
President Christian Wulff set off a heated debate by saying in his Oct. 3 German Unity Day address that the country had Christian and Jewish roots but the presence of a large Muslim minority meant that Islam too now "belongs to Germany."
Conservative leaders argued Germany had a "Judeo-Christian heritage" that Islam did not share and demanded Muslims do more to integrate into German society.
A leading lay Roman Catholic leader said Muslims could not be partners for an agreement with the state because Islam did not have a hierarchy and structure like established churches.
"Of course Muslims have the right to live out their religion and the state must guarantee their religious freedom," Alois Glueck, head of the Central Committee of German Catholics, told Deutschland radio. "But there is no organized church or authority in Islam ... that could be a partner."
The Hamburg agreement would integrate Muslims in several practical ways. For example, city schools would have to hire Muslims to teach Islam in religion classes all pupils attend. These are now run by teachers from the local Lutheran church.
It would ensure burial rights in municipal cemeteries, so Muslims can be interred in shrouds rather than coffins and have no other religious symbols nearby. Many immigrants prefer to be buried in their original countries to ensure a Muslim burial.
Muslim pupils would be free to skip school on two or three Islamic holidays and Muslim preachers could be posted in prisons.
Two other states, Lower Saxony and North Rhine-Westphalia, are also considering recognizing Islam. Since recognition of religions is a state issue under German law, some other states may not follow Hamburg's example.
Local politicians say the heated national debate about Islam may give some assembly members cold feet when they debate the final text. The project also lost its strongest supporter when Mayor Ole von Beust resigned in August.
"I expect it to be passed, but the outlook is not as good as it was before," said Wolfgang Beuss, religious affairs spokesman for Hamburg's ruling Christian Democratic Union (CDU) party.
Follow us on Twitter: