A federal magistrate Wednesday released one-time prominent Long Island restaurateur Harendra Singh from jail after eight months’ detention, citing his deteriorating health and saying he no longer posed a financial threat to the community.

Singh was arrested in September on numerous charges, including bribing a Town of Oyster Bay official, and was released on $5 million bond. But he was jailed in December after federal prosecutors said he had violated the conditions of his release by fraudulently attempting to obtain a $146,000 loan.

An attorney for Singh has argued that federal prosecutors have indicted Singh because they believe he can offer evidence about corruption in both the Town of Oyster Bay and Nassau County. Singh is a friend of Nassau County Executive Edward Mangano and has had restaurant concessions and favorable indirect loan guarantees from the town. Both Singh’s attorneys and officials have denied they have had any improper dealings with Singh.

Federal Magistrate A. Kathleen Tomlinson, who initially had Singh detained, ordered his release Wednesday after both his attorney, Anthony La Pinta of Hauppauge, and Eastern District prosecutors Raymond Tierney and Catherine Mirabile agreed that he had serious health problems and no longer controlled a restaurant empire.

Besides the original $5 million bond she had imposed, Tomlinson ordered Singh to be confined to his home, wear an electronic bracelet, have no contact with potential witnesses against him, and no involvement in any of his businesses. Tomlinson also barred Singh from using any electronic device, such as a computer or cellphone, except for a landline telephone, which he could only use to contact relatives or his attorneys. She said Singh could only leave his home to visit doctors or his attorneys.

La Pinta said his client was “very, very, very sick” with diabetes, fainting spells and gall bladder problems. He was afraid Singh’s continued jailing could be “a death sentence,” La Pinta said. He said Singh had lost consciousness a dozen times since he was jailed at the federal Metropolitan Detention Center in Brooklyn, collapsing to the floor and often banging his head.

advertisement | advertise on newsday

In addition, La Pinta said his client no longer has the resources to be an economic danger to the community — the reason for which he was jailed — because he no longer controls his restaurants, having sold them, or being in the process of selling ones that are not operating. Singh is now “in dire financial circumstances,” depending on relatives for support, La Pinta said.

Both Singh and his wife, Ruby, declined to comment afterward, as did Tierney and Mirabile.

La Pinta said: “At this juncture our focus is on the next scheduled hearing in January.” The start of Singh’s trial is scheduled for Jan. 9.

Singh was arrested in September 2015 on a 13-count indictment. Six of the counts accused Singh of paying a bribe to a former Oyster Bay deputy town attorney to get an “indirect guarantee” of $32 million in loans for his businesses, including food concessions he ran at town beaches and a town golf course.

Other charges included defrauding the Internal Revenue Service by not reporting millions of dollars in wages paid to employees of his restaurants and fraudulently collecting almost $1 million from the Federal Emergency Management Agency. The latter accusation refers to Singh allegedly collecting the money for falsely claiming his Water’s Edge restaurant in Long Island City was damaged during superstorm Sandy.