Safoorah Khan had taught middle school math for only nine months in this tiny Chicago suburb when she made an unusual request. She wanted three weeks off for a pilgrimage to Mecca.

The school district, faced with losing its only math lab instructor during the critical end-of-semester marking period, said no. Khan, a devout Muslim, resigned and made the trip anyway.

Justice Department lawyers examined the same set of facts and reached a different conclusion: that the school district’s decision amounted to outright discrimination against Khan. They filed an unusual lawsuit, accusing the district of violating her civil rights by forcing her to choose between her job and her faith.

As the case moves forward in federal court in Chicago, it has triggered debate over whether the Justice Department was following a purely legal path or whether suing on Khan’s behalf was part of a broader Obama administration campaign to reach out to Muslims.

The decision to take on a small-town school board has drawn criticism from conservatives and Berkeley officials, who say the government should not be standing behind a teacher who wanted to leave her students.

The lawsuit, filed in December, may well test the boundaries of how far employers must go to accommodate workers’ religious practices — a key issue as the nation grows more multicultural and the Muslim population increases. But it is also raising legal questions. Experts say the government might have difficulty prevailing because the 19-day leave Khan requested goes beyond what courts have considered.

“It sounds like a very dubious judgment and a real legal reach,” said Michael B. Mukasey, who was attorney general in the George W. Bush administration. “The upper reaches of the Justice Department should be calling people to account for this.”

His successors in the Obama administration counter that they are upholding a sacred principle: the right of every American to be free of religious bias in the workplace. “This was a profoundly personal request by a person of faith,” said Thomas E. Perez, assistant attorney general for civil rights, who compared the case to protecting “the religious liberty that our forefathers came to this country for.”

The Obama administration has gone to great lengths to maintain good relations with Muslims — while endorsing tough anti-terrorism tactics. Attorney General Eric H. Holder Jr. has called protecting the civil rights of Muslims a “top priority,” and his department has filed other legal actions on behalf of Muslims, including a corrections officer in New Jersey not allowed to wear a head scarf at work.

Perez denied any political motive in the Berkeley lawsuit, saying it was pursued in part to fight “a real head wind of intolerance against Muslim communities.” People in the rapidly growing Muslim community in Chicago’s western suburbs praised the Justice Department’s involvement.

“It rings the bell of justice that they will fight for a Muslim wanting to perform a religious act,” said Shaykh Abdool Rahman Khan, resident scholar at the Islamic Foundation mosque near Berkeley. “That certainly can win the hearts of many people in the Muslim world.”

Although the Justice Department, including during the Bush administration, and private plaintiffs have filed civil rights lawsuits on religious grounds, they have tended to be over issues such as whether employees can take off on the Sabbath or wear religious head coverings.

Cases involving the Muslim pilgrimage to Mecca, or hajj, are exceedingly rare, said Christina Abraham, civil rights director for the Chicago office of the Council on American-Islamic Relations.

19-day request

Khan arrived in November 2007 at Berkeley’s MacArthur Middle School, a faded brown brick building across from the public works department. She supplemented the math curriculum for sixth through eighth grades and helped prepare students for state tests.

Berkeley is a virtual speck on the map, a blue-collar village of about 5,000 people, rail yards, strip malls and ranch-style homes. The community, about 15 miles west of Chicago, is majority African American and Hispanic, and about 75 percent of its voters cast their ballots for Barack Obama.

The support for Obama’s Justice Department is much more mixed. Government lawyers, said longtime village President Michael A. Esposito, are “targeting a small community.”

“The school district just wanted a teacher in the room for those three weeks. They didn’t care if she was a Martian, a Muslim or a Catholic,” said Esposito, a political independent. “How come we bow down to certain religious groups? Why don’t we go out of our way for the Baptists or the Jehovah’s Witnesses?”

Khan, 29, who grew up in North Carolina and Arkansas, was happy in the job, said her lawyer, Kamran A. Memon. But she longed to make the hajj, one of the five pillars of the Islamic faith, which Muslims are obligated to do once. It would not have fallen on her summer break for about nine years.

“This was the first year she was financially able to do it,” Memon said. “It’s her religious belief that a Muslim must go for hajj quickly . . . that it’s a sin to delay.” Khan declined to comment.

In August 2008, Khan requested an unpaid leave for the first three weeks of December that year. The district said the leave was unrelated to Khan’s job and not authorized by the teacher union contract, according to court documents. Khan resigned in a letter to the school board.

“They put her in a position where she had to choose,” Memon said. “Berkeley has qualified subs. She didn’t feel her absence would cause any problem at all.”

He attributed the criticism of the lawsuit, in part, to “anti-Muslim hostility.”

Federal intervention

In November 2008, Khan filed a religious discrimination charge with the Equal Employment Opportunity Commission, and last year, the commission found cause for discrimination and referred the case to the Justice Department.

Justice lawyers sued in December, the first lawsuit in a pilot project to increase coordination on employment discrimination between the department’s Civil Rights Division and the EEOC.

The suit argued that the district violated the Civil Rights Act by failing to accommodate Khan’s religious beliefs. By “compelling” Khan to choose between her job and religion, the lawsuit says, the district forced her discharge. The government is seeking back pay, damages and reinstatement for Khan, and a court order requiring Berkeley schools to find ways to accommodate religious practices.

A trial date has not been set.

Berkeley school officials declined to comment but said in court papers that Khan’s request was “unreasonable” and would have imposed an “undue hardship.”

Federal law requires employers to “reasonably accommodate” religious practices unless doing so would impose such a hardship. The Supreme Court has interpreted the provision narrowly, saying accommodations should be granted only if they impose a minimal burden on employers.

Hans von Spakovsky, a Justice Department civil rights official in the Bush administration, said, “No jury anywhere would think that a teacher leaving for three weeks during a crucial time at the end of a semester is reasonable.”

“This is a political lawsuit to placate Muslims,” he said.

Perez said the district committed “a very serious” violation by “summarily” rejecting Khan’s leave. He added that Bush officials critical of the department’s lawsuit had “amnesia” because they filed similar lawsuits. “I’m perplexed as to why suddenly, in the context of protecting Muslims,” there is opposition from officials in the former administration, he said.

Eugene Volokh, an expert on religions and the law at the UCLA law school, said he does not know of any cases involving a 19-day leave, though many courts have said employees can take off one weekend day on the Sabbath in some circumstances. “That’s a 52-day-a-year leave, just not all at once,” he said.

A number of courts have also upheld religious-based leaves of up to 10 days.

But Khan’s 19 consecutive days “cuts against her, makes it more of a hardship for the employer” said Volokh. He added, “I don’t want to suggest that this is an easy case for the Justice Department” to win.

In Berkeley, opinions on the lawsuit — and Khan — are divided.

“What about the kids’ rights?” said Mike Hasapis, owner of the local coffee shop. “Don’t they have a right to be educated? Three weeks off is a long time.”

Bernard Peters, whose daughter attends Khan’s former school, said the district “should have accommodated her. It’s her religion. Right is right.”

A few miles away at the Islamic Foundation, support for Khan was uniform. “If she was a Jew, would they treat her the same way?” Nabih Kamaan of Bloomingdale, Ill., asked as he arrived for Friday prayers.

“What if she was sick? What if she had a baby?” said Kamaan, who added that the lawsuit “is the right thing to do.”

Staff researcher Julie Tate contributed to this report.