A Massachusetts travel agent has been sentenced to almost four years in prison for using millions of dollars in deposits from cruise customers to support his gambling habit.

Federal prosecutors say about 400 customers were left in the lurch after paying Tom Harper Cruises nearly $3 million. They say Bret Gordon, a Waltham man who was the business' majority owner, took about $2.25 million of that.

Prosecutors say Gordon had exclusive control of the finances at the Newton business, which sold overseas river cruise vacations.

The 44-year-old was also sentenced Wednesday to three years of probation and was ordered to pay full restitution. He pleaded guilty in November to wire fraud and tax offenses.

The company declared bankruptcy.