(CNN) -- The long-running battle between a Tennessee Muslim community and its critics over a new mosque took a dramatic turn with a county judge's ruling that could bring construction to a halt.
"Everyone is really shocked, many people are crying about this," Imam Osama Bahloul, leader of the Islamic Center of Murfreesboro, said early Wednesday.
"We did exactly what other churches in the county did," he said. "We followed the same process that other churches did. Why did this happen? Some people feel like it is discrimination."
The judge, Chancellor Robert Corlew, ruled Tuesday that plans for the new mosque that had previously been approved by a local planning commission were now "void and of no effect."
He said the planning commission violated state law by not providing proper public notice. The ruling throws the date of the mosque's completion, scheduled for July, up in the air.
Rutherford County Attorney Jim Cope said Corlew did not address the issue of whether work on the mosque has to stop right away. He said county planners will discuss options and determine an appropriate course of action.
"I don't have answers at this point," Cope said.
Bahloul said construction will go on until the Islamic Center receives orders to stop.
"The ruling was a bit foggy," he said. "We will do what's right."
During the trial, attorneys for the mosque's opposition argued that the county failed to alert the public about meetings before the mosque was approved, CNN affiliate WTVF reported.
"We're very pleased," said attorney Joe Brandon, who has led the legal effort to stop the expansion.
The ruling was a victory for all the county's residents, he told WTVF.
Rutherford County attorneys said that the meetings were announced in the local free newspaper and on its website and that the notices clearly complied with Tennessee law.
The judge, however, said the announcements in a local paper were "in relatively small type near the bottom of a page which contained a number of advertisements and legal notices, most of which were provided by the city of Murfreesboro."
The Islamic Center has 30 days to appeal the ruling and plans to apply again for a permit, spokesman Saleh Sbenaty said.
"Hopefully, this time, the county will make it right," he said. "We followed the process according to the law. There is no question about it. We are singled out just because of our faith."
However, Brandon said the mosque will have to brace for stiff opposition.
"If this Islamic political organization does decide to go back through this process again, we will be standing right around the corner, ready to do battle again," he said.
The mosque expansion gained national attention, including a CNN documentary, because in some ways, it was similar to the proposal to build an Islamic center two blocks from the site of the September 11, 2001, attacks in New York.
The Islamic Center of Murfreesboro has existed for more than a decade, but the fight erupted in May 2010, when planning commissioners approved the center's plans to build a 52,960-square-foot building for a new mosque on Veals Road.
The backlash was stinging and included intimidation, lawsuits and an August 2010 fire that destroyed construction equipment and damaged vehicles at the construction site for the mosque. Police said it was arson.
A sign announcing the mosque was spray-painted with the words "Not Welcome."
For months, mosque leaders searched for contractors willing and able to do the job. Because of the opposition and threats the project has provoked, the construction job became more complicated. The work now requires more layers of security, including cameras.
Some contractors weren't willing to take the job. Mosque leaders said contractors told them it had become too much of a hot-button issue and presented too much of a risk to their business and equipment. Several contractors began the bidding process but never finished.
Mosque officials said one contractor told them that he needed the work but that the leaders of his own church were against the new Islamic center.
In September, Corlew, the Rutherford County judge, ruled that the Muslim group had a right to build the larger facility.
In the opinion, Corlew said organizations must be treated equally under current land-use ordinances, but added that some of the county's land use laws are "in dire need of revision."
Corlew also wrote that the plaintiffs suing Rutherford County's planning commission can challenge whether the mosque's approval violated open meeting laws.
That led to the lawsuit and trial that was decided this week.
Opponents of the mosque have also argued that Islam is not a real religion deserving of First Amendment protections and claimed that the Islamic Center of Murfreesboro had links to terrorism, WTVF reported.
The judge dismissed those allegations, the affiliate reported.
The congregation has outgrown its old facility and worshipers have to pray outside the crowded mosque, said Bahloul, the leader of the Islamic Center.
"I am confident that American values will prevail in this," the imam said. "What makes America so special is how it handles freedom. This decision does not seem like it reflects American values."