In an apparent violation of the rules, Rep. Charles Rangel used campaign funds to pay for his New York attorney’s license earlier this year, The Post has learned.

The $375 registration fee, which was paid to the state’s Office of Court Administration on Jan. 21, appears to run counter to federal campaign regulations.

The rules bar campaigns from making payments that would have to be made even if the candidate weren’t running for office.

It wasn’t until repeated inquiries from The Post that a spokesman said Rangel was in the process of reimbursing his campaign for the charges.

“This was an oversight that was immediately corrected,” said spokesman James Freedland.

Rangel, 83, doesn’t currently practice law, but he used to before seeking public office decades ago.

He’s facing a strong primary challenge to secure his 23rd term in office from state Sen. Adriano Espaillat and Harlem preacher Michael Walrond.