SULLIVAN CITY, Tex. — Casino gambling with cash payoffs is illegal in Texas. But on a drizzly Tuesday afternoon in February, you could not tell it by the scene inside a former tire shop near this Rio Grande Valley border town: a few dozen men and women gambling on 75 slot machines in windowless rooms.

Among the cattle ranches and wind-battered palm trees on U.S. Highway 83, the setting was lowbrow — free chips and soft drinks were the only amenities — but the payouts, in one of the poorest sections of Texas, were substantial, up to $4,000 per play.

After sliding their money into the machines, gamblers who scored jackpots raised their hand, yelled “Ticket!” and waited for a worker carrying a thick wad of bills to convert the points they had won to cash.

Despite laws saying otherwise, casinos thrive throughout the state, an underground billion-dollar industry that operates in a murky realm and engages in a perpetual cat-and-mouse game with the authorities. It is unlawful for slot-machine casinos to pay cash to gamblers, but it is legal to own, operate and play the machines in Texas, as long as the prizes are cheap noncash items such as coffee pots.