A man accused last year of handing over his company credit card to an escort he met online — who then racked up more than $5 million in personal charges — admitted his fraud Wednesday.

Scott Kennedy, 44, stood before U.S. District Judge Elaine Bucklo and told her “I plead guilty” after explaining that he also used company funds to cover up the personal expenses he and Crystal Lundberg charged to the account.

Kennedy, who said he is living in Texas, faces a maximum of 20 years in prison at his sentencing hearing on one count of wire fraud. The hearing is set for May 16. Lundberg has also been charged with wire fraud, and her case is still pending.

The feds say Kennedy met Lundberg online in 2012, later gave her access to the company credit card and told her his “a– was on the line.”

Then, within two years, she had allegedly helped him rack up $5.79 million on jewelry, electronics, a chauffeur, a maid, two purebred dogs, travel to luxury hotspots, rent and a spa she wanted to open in San Diego.

Kennedy was fired from his job at Nemera, a company based in France with offices in Buffalo Grove, in March 2017. Until then, the feds say he had been the company’s highest-ranking financial executive. Court records also indicate Kennedy chose to cooperate with the FBI.

Kennedy told agents he met Lundberg on backpage.com and solicited her services eight to 10 times. In mid-2015, he said she reached out to him by text looking for help with money. By the end of the year, he said Lundberg and her children had moved in with him in Buffalo Grove, bringing their pets along. From there they moved around together until Lundberg moved to San Diego in 2016.

Around the time she first moved in with him, Kennedy said he gave Lundberg access to his company credit card after she asked for help buying Christmas presents for her kids, records show. She claimed she had been adopted by a wealthy family as a child and had a trust fund worth $4 million that would vest when she turned 30. Kennedy told agents he thought he would be reimbursed once she had access to her trust fund, and then he planned to pay his company back.

However, Lundberg filed for bankruptcy in 2009 and never reported the existence of any trust fund, the feds say. Kennedy also acknowledged he never saw any documentation from Lundberg.

Kennedy’s company confronted him about the spending in March 2017, records show. Although Lundberg had allegedly made the majority of the purchases, the feds say Kennedy admitted making personal charges. He was also accused of falsifying his company’s accounting records to make it appear their purchases were business related.

Lundberg allegedly bought furniture, spent $8,000 monthly on a personal driver for her kids and a $2,500-per-month maid in San Diego, paid for therapy and prescription drugs, spent $60,000 on two Rolex watches and paid for trips to Bali, France, Costa Rica, Hawaii, Santorini, Bora Bora and Fiji. She even allegedly spent $24,000 to move her potted plants from Illinois to California.