“I think it’s clear now that for years we made the mistake of alienating people,” said Nicola Beer, who as education minister in Hesse was one of several politicians, professors and teachers who pushed for the Islamic instruction. Now, she said, Germans recognize that “we are here together, we work together, and we educate our children together.”

In the broadest terms, the curriculum in Hesse attempts to counter the strident proselytizing of more hard-line strains of Islam. But while offering instruction in Islam is part of the equal treatment craved by many of Germany’s Muslims, it is also no straightforward task in legalistic and federal Germany.

Each of the 16 states determines its own education system and how noncompulsory religion, or ethics, instruction is offered. Islamic instruction in some form is available in all former West German states, though none of the eastern ones, where there are historically few Muslim immigrants. What makes Hesse special is that the state developed a university program and has taken charge of training teachers.

In other places, such as Berlin, instruction in Islam has already been offered for several years, but teachers have been provided by organizations like the Islamic Federation, a community group, which also helps to decide the curriculum.

Fazil Altin, 34, a lawyer who is president of the Islamic Federation, said Muslims and the city authorities in Berlin had wasted 20 years while they battled in court about whether Islam could be taught. Then, Mr. Altin said, the federation had to overcome suspicions about indoctrination — and all for 40 minutes’ instruction per week, which he called “pretty paltry.”

In his view, it will take more than formal state instruction in Islam to bridge the cultural gap between observant Muslims and a highly secular German society. “It is difficult to be a Muslim in Germany,” said Mr. Altin, who said he had been denied access to clients in jails because of his faith. “The fact is, we are seen as a danger.”

The Jens Nydahl school, in Berlin’s heavily Turkish and Arab Kreuzberg district, is a prime example of the challenge of integration.