Mikhail Perlov and a newspaper advertisement for his illegal law practice. ()

A Brooklyn man who masqueraded as an attorney for several years and defrauded tens of thousands of dollars from unwitting clients has been sentenced to six months in prison.

Mikhail Perlov, 31, who had been ordered to shutter his sham legal practice in 2015 but nevertheless continued taking clients, was convicted of 13 felony counts that include one count of appearing as an attorney without being admitted and registered and two counts of none but attorneys to practice in the state, both class E felonies, according to a news release from Attorney General Eric Schneiderman’s office.