The fight is not just playing out in a courtroom. It has engaged residents as well, who have a classic love-hate relationship with the retailer.

Some love it because it employs them, sells some of their locally made products and gives them access to goods they might not otherwise find on the island. Others hate it because, they say, it crowds out local competition and disrupts Puerto Rican neighborhoods and daily routines. Walmart has 55 stores in Puerto Rico, including some operated under different names, and it employs almost 15,000 people.

And now that Puerto Rico’s government is nearly out of cash and still has a $72 billion debt to be paid, some are incensed that Walmart is balking at the tax, contending that as one of the largest retailers in the world, it can well afford to pay. They hooted at the notion that the tax was a “death sentence.”

“They have a lot of money,” said Antonio Hernández Brignoni, 83, wheeling a shopping cart through a bustling Walmart parking lot in the small city of Hatillo on a recent day. “Come here at midnight and you’ll see how much money they make.”

Midnight, he explained, was when Walmart’s managers would be counting the cash in the till.

But the company counters that the tax rate is “three times the average effective tax rate that Walmart’s affiliated companies pay worldwide,” making it one of the highest taxes in the world.

Much of the courtroom discussion so far has centered on Puerto Rico’s finances, with Judge Fusté expressing frustration over the government’s failure to produce audited financial statements for 2014 and 2015. Members of Congress have made much the same complaint in hearings on how to help Puerto Rico unwind its debts.