In an empty room at the Legal Training and Research Institute of Japan, a place of study for those who have passed the National Bar Examination, 36-year-old legal apprentice Junko Hayashi was permitted last year to perform Islamic prayers. She was also allowed to wear a hijab covering her head. It was apparently the first time such allowances had been made.

Hayashi, a resident of Tokyo, will become a lawyer this year after finishing her training at the institute in Wako, Saitama Prefecture. Her decision to enter the legal profession stemmed from unforgettable experiences of the past.

In the autumn of 2002, Hayashi, then a university student, was looking for work. After receiving an interview at a stationery company, the hiring official approached her.

“You’ve received a high evaluation. But if you keep wearing that (hijab) it could violate our company’s regulations,” the official told her.

Hayashi was wearing a hijab. “I’m only wearing it as a personal obligation,” she said, telling the officer she had no intention of removing it. The company did not contact her again.

Hayashi chose to become a Muslim when she was studying in the United States. She studied the Quran, and felt that something about it was applicable in the present time.

When she returned home in 2001, her parents didn’t say anything, but that year the September 11 terrorist attacks hit the United States, and their attitude changed. “Give up Islam,” they urged her. “You won’t get a job and won’t be able to marry.”

But Hayashi didn’t waver. In all of her resumes when looking for a job, she used photos of her wearing a hijab. She sent them out to about 40 companies, focusing on the energy and shipping industries, which often engage in business with Muslim countries.

She got interviews with only a handful of companies, however, and received no informal job offers.

Another 33-year-old Tokyo resident who works for a communications company studied the Quran as a student, and was attracted to Islam, thinking that carrying out the message of supporting one another would lead to world peace. She became a Muslim in 2009.

A Japanese Muslim she knew told her that relationships with other people had ceased to go well. Fearing isolation, she secretly wore her hijab at weekends, and went to work during the week wearing a knit hat.

She performed her daily prayers only at home.

Around two years ago, her boss noticed at a company gathering that she wasn’t drinking alcohol or eating pork, which are prohibited in Islam. She confessed that she was a Muslim and asked that she be allowed to wear a hijab.

But her boss didn’t comply, telling her, “Separate your personal and public life. Religion is personal.”

In January last year, the month the militant group Islamic State (IS) murdered two Japanese hostages, while she was riding in a train wearing her hijab, an elderly woman called her “scum.” Thinking that the murders had played a part, she became scared.

“Japanese outwardly say they don’t discriminate, but they have an allergy somewhere to belief in a specific religion. They shouldn’t have any right to discriminate those who believe,” she said.

Before passing the National Bar Examination, Hayashi first worked for a company run by her parents at home. On the side, she helped a non-profit organisation involved in humanitarian support activities.

She met a Muslim from Afghanistan who was seeking recognition as a refugee, and keenly felt a sense of powerlessness not being able to offer assistance.

At the same time, Hayashi observed that a lawyer with whom she came into contact through such activities, and realised there was a possibility of changing society through law and the courts. She had finally found direction in her life.

On the day of the bar exam, officials checked the inside of her hijab for any irregularities. This saddened her.

“It’s a part of my attire. Do they check inside people’s skirts?” she said. After passing the bar exam, she asked the Legal Training and Research Institute to make allowances for her.

“As a lawyer, I want to slowly gain understanding from those around me through day-to-day activities,” she says, wary of the friction that can emerge when faith surfaces in a tangible form.

According to the Agency for Cultural Affairs, there were about 91.3 million Shinto adherents, some 86.9 million Buddhist adherents, about 2.9 million adherents of Christianity, and 9.1 million adherents of other religions in Japan as of the end of 2013. The figures indicate that most people follow both Shinto and Buddhism.

Islam is one of three major world religions alongside Christianity and Buddhism. One in five people in the world are said to be Muslim.

According to Hirofumi Tanada, a professor at Waseda University specialising in sociology, there are 20,000 to 30,000 Japanese Muslims in Japan. Many become adherents upon marriage with a foreign Muslim, and the number of Japanese who have converted to Islam themselves is said to be in the range of several thousand.

Under the Meiji Constitution, Japanese nationals were allowed freedom of belief, with the restriction that it didn’t disrupt peace and order and other duties. Shinto was given special status as a national religion.

Meanwhile, as a national policy during war, a policy of tolerating Muslims was adopted to reassure people in occupied territories.

In 1945, after the war, religion and Shinto were separated at the direction of the General Headquarters of the Supreme Commander for the Allied Powers, due to concerns over militarism.

The ensuing Constitution of Japan guarantees freedom of religion to all, and has a clause separating the state from religious activity.