A Massachusetts legislator was arrested Tuesday for illegally using campaign money to fund personal expenditures, including a heavy gambling habit at both online and brick-and-mortar casinos in the northeast.

Rep. David Nangle was arrested in Boston and charged in federal court for illegally using those funds. According to local media, court documents reveal that Nangle knew the practice was strictly prohibited and still used the money to pay for dues at a local golf club, travel expenses for casino trips, flowers, restaurants and thousands of dollars in gift card purchases.

The 59-year-old Democrat was indicted on 10 counts of wire fraud, four counts of bank fraud, nine counts of making false statements to a bank and five counts of filing false tax returns.

He was elected to serve the 17th Middlesex District in 1999 and was a member of the state legislature for the past two decades, including a stint as the House Ethics Committee Chairman. According to records, Nangle earned a $100,000 yearly salary, but still consistently had money problems.

“Despite his salary and perks, Nangle was heavily in debt, had poor credit and had regular cash flor problems as a result of extensive gambling at various casinos in Connecticut, New Hampshire, Massachusetts and Rhode Island, among others – placing thousands of bets on internet gambling sites,” the indictment read.

Nangle lied to banks on loan applications by overstating his income and understating his outstanding debts, which allowed him to get loan amounts larger than he would have otherwise. Those loans helped fund his gambling habits and repay personal debts.

Nangle was more than $100,000 in debt just to local friends and business owners. Those loans were paid back entirely with funds from the campaign. Additionally, he did not pay for up to $8,000 in renovations to home, opting to hand the contractor his business card and give him “lucrative bids for construction projects for which Nangle has secured with state funding,” according to ABC News.

From 2014-2018, he also filed false tax returns with fake business deductions for “consulting” work.

Wire fraud charges carry a penalty of up to 20 years behind bars, three years of supervised release and a $250,000 fine. The bank fraud and false statements each could cost him up to 30 years in prison and up to a $1 million fine. Filing false tax returns are punishable by up to three years locked up and a $100,000 fine.