Despite the demands of running the mosque, she takes Arabic classes and continues to work as a lawyer. She considers achieving a degree in Islamic theology important to her recognition in the Muslim community. “I want to understand the words and know the meanings so no one can say, ‘She’s just a lawyer,’ ” she said.

Born in Istanbul to a Turkish mother and a Kurdish father, she emigrated with her parents to what was then West Berlin in the late 1960s, part of the first large wave of Muslim immigrants who came to fill the blue-collar jobs needed to rebuild the German economy after World War II. Ms. Ates was 6 when she and her four siblings moved into a one-room apartment with their parents.

As she learned German and excelled in school, Ms. Ates says, she came to understand that it was not the crowded living conditions that she found suffocating, but the realization that because of her gender she was not afforded the freedoms of her non-Muslim peers.

“I was a girl,” she wrote in 2007 in Zeit Online. “I embodied the family’s honor and my hymen — for a long time I didn’t even know what that was — was more important to the whole family than my brain.”

At 17, she fled her home, graduated from high school and started studying law at the Free University of Berlin. To support herself, she worked as a counselor in a women’s center. In September 1984, she was speaking with a client when a man wearing a trench coat entered the center, pulled out a pistol and fired three shots. One hit the client in the stomach, killing her; the other struck Ms. Ates.

She survived to see the suspect, a Turkish bricklayer, acquitted for lack of evidence, which enraged her. For years, she struggled with the psychological fallout of the attack. She returned to her faith, but was again alienated by Berlin’s traditional, conservative mosques, where women were forced to pray behind a curtain. She decided that if the faith community that she needed did not exist, she would create it.

It took years of planning, fund-raising and looking for a suitable space. While she received support from like-minded liberal Muslims from Switzerland to the United States, the critics have remained.