ST. PETERSBURG — It was the glitch that kept on giving.

That's how Choice Hotels International, one of the world's largest hotel chains, portrays a flaw in its online reservations system in a lawsuit accusing a St. Petersburg man of fraudulently redeeming gift cards worth $48,500 in a rewards program for loyal customers.

Robert Chat, 38, discovered the Choice Hotels booking system didn't erase his rewards points when he canceled a reservation, the suit said. So Chat began making, and quickly canceling, hundreds of reservations from October to January, then redeeming gift cards earned as a "reward," Choice Hotel alleges. Chat denies wrongdoing.

The gift cards could be used at a variety of stores and restaurants, including Dunkin' Donuts, Home Depot, Target and Applebee's.

Choice Hotels filed suit against Chat on May 21 in Pinellas-Pasco Circuit Court seeking to recover its losses and additional damages, and said Chat knew or should have known that people don't get rewarded by hotel franchises for declining to spend their money on a room.

The points "are offered as a reward in exchange for actually staying at Choice Hotels, not simply for making a reservation," the lawsuit said.

Officials at Choice Hotels, a chain that franchises 6,300 hotels that include Econo Lodge, Comfort Inn and Clarion, among others, declined to comment Tuesday.

Chat, 38, who said he had not been aware of the lawsuit until a reporter asked him about it, wrote in an email to the Tampa Bay Times that he received less than 10 percent of the $48,500 in gift cards alleged in the lawsuit.

"I'll be hiring a lawyer tomorrow to fight the suit as there was nothing done illegal nor was anything done in malice," Chat said late Tuesday. "I stayed at over 1,100 Choice hotels in the last five years. … I worked with their bonus structure to obtain points."

He added, "I'm not even computer literate. If I obtained more rewards than allowed, it's on their end, not mine. As I've stayed in their hotels exclusively for over six years, points do accumulate."

It is unclear what Chat does for a living. Chat is listed by the state as president of Dragonsong Weapons Inc., a company that makes and sells swords. It is unclear if the company is still in operation. Articles of incorporation were filed in 2010, but there have been no corporate filings since, state records show.

Choice Hotels said Chat had been a customer of its hotels and had "actually stayed at" several before he discovered the flaw in the reservation system.

Like most other hotel chains, Choice Hotels operates a rewards program to keep customers coming back. It calls the program Choice Privileges.

"Our points will really add up, fast and freely," Choice Hotels boasts online. Earn "points for that little something to make today extra special — like a coffee to perk you up or a song for your morning drive."

The lawsuit said the rules of the program make it clear that customers earn the points for "actually staying in a Choice Hotel room and paying for the room in full."

"Frequent-stay programs are common throughout the industry and neither Choice nor its competitors offer rewards for frequent reservations," the lawsuit said.

An attorney for Choice Hotels sent a March 12 letter to Chat demanding he pay triple damages to the company within 30 days, which the lawyer said is allowed under Florida law for cases involving civil theft. Choice Hotels said that meant Chat owes it $145,500.

The suit, which does not indicate if any other customers took advantage of the glitch, said Chat did not respond to the demand letter.

Promotions and loyalty programs have become a staple of American commerce. So too are tales of consumers who jump at the chance to take a promotion to the extreme.

One of the best-known cases involved a California civil engineer who in 1999 became something of a cult hero when he noticed at the local supermarket a promotion by Healthy Choice allowing consumers to earn 500 to 1,000 frequent-flier miles if they sent in the bar codes from 10 of the company's products.

David Phillips, according to published reports, purchased $3,150 worth of pudding to successfully earn $150,000 worth or free airline mileage — more than 1.2 million miles worth.

Times researchers Caryn Baird and John Martin contributed to this report. Contact William R. Levesque at levesque@tampabay.com or (813) 226-3432. Follow @Times_Levesque.