A Long Island man who pleaded guilty to engaging in a $1.1 million insider trading conspiracy with his son escaped jail time in his sentencing in federal court in Manhattan on Wednesday.

U.S. District Judge Laura Swain said Robert Stewart, 61, of North Merrick, was needed as a critical caregiver for his wife before giving him a year of home detention and four years of probation for trading on tips from his investment banker son, Sean.

“But for Mrs. Stewart’s urgent medical needs . . . Mr. Stewart would merit a custodial sentence of significant length,” said Swain, who did not specify the medical problem and allowed Stewart’s lawyers to redact details from their court filings.

Sean Stewart, 35, of Manhattan, was accused a year ago of passing tips beginning in 2011 on five health care companies from two investment banks where he worked to his father, who in turn worked with a third conspirator, Richard Cunniffe, to place trades.

Some of the proceeds were used to pay for the son’s wedding, prosecutors said, and Robert Stewart used golf-related codes with Cunniffe to discuss the trading. Cunniffe, who has also pleaded guilty, became a cooperating witness and recorded conversations.

Robert Stewart, an accountant, pleaded guilty last August and faced a sentence of 30 to 37 months in prison under federal sentencing guidelines, but he and his lawyer cited his otherwise clean record and his quick plea as well as his wife’s health in seeking leniency.

“I spend every sleepless night and every waking moment thinking about the destruction that’s been caused,” Stewart told the judge. “All I want is to move forward hopefully with the leniency of the court . . . to help my community again and look after my wife.”

Half the courtroom was packed with friends and family, including Stewart’s priest, the Rev. Thomas Gallagher, formerly the pastor of Sacred Heart Church in North Merrick.

“In the year of mercy, the judge was very compassionate,” Gallagher told reporters after the sentencing. “The pope would be very happy.”

advertisement | advertise on newsday

Although the scheme netted $1.1 million, prosecutors conceded that only $150,000 of the profits went to Stewart. Swain ordered him to pay that back, perform 750 hours of community service, and submit to electronic monitoring to make sure he follows curfews.

Sean Stewart’s trial is scheduled for July 25.