A judge has ruled that a black South Carolina church owns a building that sells Ku Klux Klan memorabilia, ending a legal battle between the two.

The Redneck Shop, a KKK museum that sells Klan robes, t-shirts with racial slurs and other KKK memorabilia, has operated from an old movie theater since 1996, according to The Associated Press. However, a circuit judge ruled last month that New Beginnings Baptist Church is the rightful owner of the building. The judge ordered the shop’s owner to pay the church’s legal bills of over $3,000.

According to court records, ownership of the building was transferred in 1997 to the Rev. David Kennedy and the New Beginnings Baptist Church by a klansman in dispute with others in the group. The judge wrote that the Klansman was at odds with the store owner over a woman, and had also developed a spiritual relationship with New Beginnings church, according to The Huffington Post.

However, a clause in the deed gave John Howard, a former KKK grand dragon, rights to operate the business in the building until he dies.

Kennedy and the New Beginnings church sued Howard in 2008, after years of trying to have the property inspected, and on Dec.9 a judge ruled in his favor.

Howard has always defended his shop, saying he isn’t breaking the law.

“If anything turns people off, they shouldn’t come in here,” Howard told AP 2008. “It’s not a thing in here that’s against the law.”

It is not yet clear if the judge’s ruling would mean Howard must close his shop.

The Redneck Shop has been the target of many protests and attacks since it first opened. A Columbia man crashed his van through the front windows a few days after it opened. High profile activists have also stage protests outside the store, where Kennedy has regularly picketed.

Kennedy, who has a long history of battling racial injustice, said his congregation will be elated by the judge’s decision, according to the Washington Post.

“It has been a long time coming,” he said. “We knew we had done everything right. … The court knows that we have suffered.”

He claims that his congregation’s numbers have decreased in recent years due to fear of retaliation from Klan members. New Beginnings has seen Nazi and Confederate symbols pinned to the church’s door. Dead animals have also been left at the building.

“A lot of people became so afraid,” Kennedy said. “I just told them that it is part of our faith to endure.”

Kennedy previously said he would close the store and hold church meetings in there, but has declined to detail his plans. He claims that some parishioners would feel uncomfortable worshiping in the structure that once segregated moviegoers and now sells Klan-related material.