A Muslim congregation fighting for two years to open its new mosque won a round in federal court just in time, because a Tennessee judge had intended to stop construction, according a court order filed Friday.

Members of the Islamic Center of Murfreesboro are pushing to get into their new 12,000-square-foot building before the holy month of Ramadan, which began at sundown Thursday, ends in August.

Opponents have waged a two-year court battle to stop them, challenging the county's approval of the mosque building plan. They have claimed in court that Islam isn't a true religion and that local Muslims want to overthrow the U.S. Constitution and replace it with Islamic religious law.

In orders filed Friday in Rutherford County court and obtained by The Associated Press, Chancellor Robert Corlew wrote that he was preparing to order the county to stop mosque construction but the federal ruling superseded him. Corlew also stayed all his decisions in the case indefinitely.

Corlew had nullified the county's approval of the new mosque after finding there was inadequate public notice of a controversial issue. He also ordered the county not to allow the mosque to open.

The mosque and federal prosecutors persuaded a federal judge Wednesday to intervene. U.S. District Judge Todd Campbell issued a temporary restraining order and directed the county to begin the process of granting the approval needed for the congregation to begin using the mosque.

Building inspectors visited the site Thursday. Construction supervisor David Salimi said it would take about two more weeks of work, including connecting water and electricity, for the site to be ready to pass the final inspection and get the permit to open.

On Friday the congregation was using its cramped current quarters, where members say sometimes worshippers overflow into the parking lot because there isn't enough room inside. Members expressed thanks Thursday for a legal victory.

"I always knew it would turn out well for us because I believe in a higher power," member Tahira Ahad said. "God — He chose us to get this job done."

The court battle isn't over. The federal order expires after 14 days and lawsuits filed by the mosque and U.S. Attorney Jerry Martin and the Department of Justice Civil Rights Division have yet to be heard.

Those lawsuits argue that the rulings violate the constitutional right of mosque members to the free exercise of their religion.

Opponents haven't commented about what they might do next. They aren't a party to the federal lawsuits, which may limit their options.