'I knew what I was doing was illegal.' —Edul Ahmad (above), pleading guilty yesterday in a $50 million mortgage fraud schemeGabriella Bass

(
)

A Queens businessman who had been pressed by prosecutors to dish dirt on his friend, embattled Rep. Gregory Meeks, pleaded guilty yesterday to a $50 million mortgage-fraud scheme.

Edul Ahmad — whose $40,000 “loan” to Meeks in 2007 remains the subject of a House Ethics Committee probe — faces up to 30 years in prison when he’s sentenced for the mortgage scam that enabled unqualified home buyers to get loans.

Federal sentencing guidelines, however, suggest a prison term in the range of 10 to 12 1/2 years.

Ahmad also must pay about $14 million in restitution and forfeit $500,000.

Left unsaid at Ahmad’s Brooklyn federal-court plea hearing was whether he has provided prosecutors with damaging evidence about Meeks as part of that plea — or whether he might do so now to avoid the full weight of the stiff sentence looming over his head.

“I knew what I was doing was illegal,” said Ahmad, 45, as he admitted operating the huge mortgage scheme that spanned from 1995 until 2009 and pleaded guilty to a single count of wire fraud in furtherance of bank fraud.

The Guyana-born Ahmad said that as part of that scam, he helped obtain mortgages for home buyers who didn’t meet credit standards required by the lending banks, falsified loan documents and enlisted “straw buyers” who helped conceal the actual buyers of the homes.

Ahmad, who counts among his politician pals state Sen. John Sampson (D-Brooklyn) and the past president of Guyana, was busted in July 2011.

Sources said that since then, the feds had been leaning on Ahmad, a naturalized US citizen, to cooperate with an ongoing federal investigation of Meeks.

The Post revealed in July that investigators are scrutinizing millions of taxpayer dollars that Meeks steered to a Queens nonprofit group, the Greater Jamaica Development Corp.

Before that, the feds were eyeing his connection to the Queens charity New Direction Local Development Corp., which Meeks helped found.

In 2010, The Post exposed the fact that the charity had collected thousands of dollars for victims of Hurricane Katrina — but that almost none of the money ever made it to the intended recipients.

Meeks also faces a pending House Ethics Committee probe over the $40,000 that Ahmad purportedly loaned him in 2007.

Meeks reported that payment on his yearly financial-disclosure form only in 2010 — after it was revealed that Ahmad had been interviewed by the FBI.

“I read reports today about the guilty verdict in the Ed Ahmad case. My thoughts and prayers are with those who were affected by these crimes, and with Ed and his family,” Meeks said in an e-mail statement. “With regard to the ethics committee, as I have said in the past, I have cooperated fully with the committee and expect to be treated fairly.”

Ahmad remains free on $2.5 million bail pending sentencing in his mortgage case.