A lawyer was busted Thursday for allegedly stealing over half a million dollars from a Harlem church that he represented in a real estate deal, authorities said.

Second Providence Baptist Church agreed to let Azimuth Development Group construct a residential building on their property at W. 116th St in exchange for a hefty payment and the right to occupy the lower three floors.

The church hired attorney John Shasanmi, 39, to broker the deal in 2014 and act as an escrow agent, according to the Manhattan District Attorney’s Office.

Azimuth forked over $600,000, which Shasanmi was supposed to hold in escrow. But the crooked attorney allegedly had the cash rerouted into his personal checking account.

After the deal closed in 2017, he allegedly sent the church’s pastor forged Citibank statement, falsely showing the full escrow balance.

The ruse was up when the pastor demanded Shasanmi release the vanished funds.

The disgraced lawyer was picked up on a warrant in Philadelphia July 10 and allegedly told cops “that his arrest derives from a big misunderstanding,” according to court papers.

He pleaded not guilty Thursday to grand larceny and possession of a forged instrument.

His lawyer, Andre Travieso, declined to comment.