A Long Island attorney was arrested Wednesday on charges he stole funds meant for a client in a settlement.

Matthew Kogan of Syosset charged was with third-degree grand larceny, an offense punishable with incarceration of up to 2 1/3 to 7 years. He pleaded not guilty and was released on his own recognizance by Nassau County District Court Judge Douglas Lerose (See Profile).

Kogan was retained by a couple in February 2013 to represent them in a breach of contract suit that later settled for $32,500.

But according to the Nassau County District Attorney’s office, Kogan, 40, put the money in his firm’s operating account rather than an escrow account and used it for professional expenses like credit card payments.

Kogan’s attorney, Brian Griffin of Foley Griffin in Garden City, said in an interview that the funds were “inadvertently deposited” in the operating account with “no criminal intent,” adding that Kogan began repaying the sum when he became aware of what happened.

The district attorney’s press release said Kogan repaid $20,000 of the $32,500 earlier this year after the couple complained to prosecutors.

Griffin said Kogan had already repaid $20,000 and would continue to pay the remaining amount.

“When attorneys take advantage of their position for their own financial gain, it isn’t just their clients who suffer the consequences. The attorney-client relationship is essential to the workings of our legal system, and must be protected,” Nassau County District Attorney Kathleen Rice said in a statement.

Assistant District Attorney Marshall Trager, chief of the office’s Government and Consumer Affairs Bureau, is handling the prosecution.