It took Steven Suen only a few seconds to realize the liquid leaking from the ceiling was a mixture of toilet water and feces.

“I had seen it leak before,” he said. “I knew right away what it was.”

The scene was unfolding at Suen’s blues lounge and restaurant, Biscuits and Blues, just a block or so from the city’s tourist-friendly Union Square neighborhood. The Mason Street business shares a building with an outpost of fast-food chain Jack in the Box. The water and feces, according to Suen, were coming from pipes connected to the burger restaurant’s second-floor restrooms, which extend out over the audience seating area of Biscuits and Blues.

The situation has embroiled a family-owned small business, one of the only blues destinations left in San Francisco, in a lengthy legal battle with a national burger operation. At the center of it all is the debate over which party will pay to fix the damage. Biscuits and Blues says Jack in the Box is responsible for the work. Jack in the Box places the onus on the property’s landlord. And the landlord has said the plumbing should be addressed by Jack in the Box.

The leakage forced Suen to close the doors to Biscuits and Blues in April. It has remained closed since. The pipes continue to leak. And according to Suen, “the whole restaurant (Biscuits and Blues) smells.”

Meanwhile, Jack in the Box has continued to operate on its 24-hour service schedule without interruptions.

The issue brought the groups together for a hearing at San Francisco Superior Court on July 29. It was there that Suen’s attorney, Dan Bacon, requested an injunction — which it did not get — to keep Jack in the Box from operating until the leaking pipes were fixed. He described the situation as urgent because when Biscuits and Blues first attempted to clean the feces and water in April, mold was discovered in the ceiling and around the pipes.

“This was Jack in the Box’s fault. They know this. If we can’t open back up soon, we’re going to have to close permanently,” Suen said. “There’s no way to survive this if nothing changes.”

Jack in the Box did not respond to a request for comment.

Jack in the Box opened at Geary and Mason streets in 1987 in a building owned by Meiyan Enterprises Inc.

In the late 2000s, Saeed Khan took control of Jack in the Box as a San Francisco franchisee. Around 2012, he helped expand the restaurant to operate 24 hours per day.

During the July 29 hearing, corporate council for Jack in the Box said neither the company nor Khan were responsible for the ceiling damage. As proof, Jack in the Box cited language in the original lease for the space, from 1987.

According to the franchisee’s attorney, the lease does not directly state that Jack in the Box is responsible for the plumbing, and instead only references “fixtures” and “furnishings” within the restaurant space.

“The premises are defined as the four walls, the floor, the ceiling, the furnishings and fixtures therein,” Gordon J. Calhoun, who represents Khan, said during the hearing. “Anything that’s in the walls, anything that’s on the roof, anything that’s underneath is not included within the premises.”

Alexander Hamilton of the Versant Law Group, a representative for Meiyan Enterprises Inc., the landlord of the property that houses both Jack in the Box and Biscuits and Blues, stated that Jack in the Box needed to fix the damage or there was a possibility it would be in violation of its lease agreement.

“The lease calls for them to keep their premises in good condition. Based upon what we’ve seen, we don’t believe this constitutes good condition,” Hamilton said. “There’s a chance if they don’t address this in a timely manner, that would open them up to eviction actions. Hopefully they’ll step up and do the right thing.”

All parties are now in the process of selecting a mediator for future proceedings.

Biscuits and Blues, which opened in 1995, is an intimate San Francisco venue. About a dozen circular tables are situated a few feet from the main stage. Suen said his restaurant’s total economic losses amount to roughly $250,000 each month. This includes his $50,000 payroll, lost food and alcohol sales and his designated $70,000 to $80,000 payroll for bringing in musicians, a roster that ranges from the more Southern stylings of Sonny Rhodes to the Israeli-born Guy King.

The business has canceled six months of shows to accommodate the closure. And of the 15 people who worked for Biscuits and Blues at the time it was shuttered, Suen said only one has yet to move on to other work.

Over the 25 years that Biscuits and Blues has been in business, the city has become a more difficult place for music venues, evident in the number of locations — Elbo Room, Hemlock Tavern, Bissap Baobab — that have either closed, changed owners or relocated to other parts of the Bay Area.

Blues singer Cathy Lemons has been performing in San Francisco for more than three decades and has been a regular at Biscuits and Blues over the years. She said there was a time in the city, around the late 1980s and into the 1990s, when blues singers had roughly 20 blues venues to choose from when deciding where to perform.

Now, she said, only three are left: the Saloon in North Beach, Club Deluxe on Haight Street and Biscuits and Blues.

“There’s a sort of emptiness I see in the city. The things that made San Francisco so interesting were the characters. When you talk about those artists, those interesting, odd, eccentric people, you’re talking about blues musicians,” Lemons said.

“If Biscuits and Blues closes, a place that gave so many artists a stage and means so much to the community, you’re removing an important piece of San Francisco,” she said. “It’s something we could never get back.”

Justin Phillips is a San Francisco Chronicle staff writer. Email: jphillips@sfchronicle.com. Twitter: @JustMrPhillips