A man charged with sexually abusing 13 children through his wife's unlicensed child care business died at a hospital Friday night after an apparent suicide attempt in jail several hours earlier, his lawyer said.

Defense attorney William Barabino said John Burbine, a convicted sex offender, apparently tried to hang himself in his cell in an approximately 20-minute period between his guards' regular checks on him.

"We don't know why," Barabino said. "John was a smart man and apparently took an opportune time to do what he did."

He said Burbine was receiving half-hourly checks by guards, one of whom noticed him hanging in his cell about 10 minutes before the usual 8 a.m. check.

Burbine, 50, had no pulse, but he was revived through CPR, and efforts to maintain his pulse and breathing and to stabilize him continued for hours at the hospital, the attorney said. Burbine died at 6:26 p.m. without regaining consciousness, he said.

The Middlesex sheriff's office said Burbine was found by guards making morning rounds and was "in need of emergency medical attention." The office's statement said jail medical personnel gave him emergency treatment and notified the Cambridge Fire Department and EMS, which took him to the hospital.

The death will be investigated by jail officials and state police assigned to the Middlesex district attorney's office.

Prosecutors alleged that between August 2010 and August 2012 Burbine molested children ranging from 8 days to 3 1/2 years old through his wife's business in Wakefield, a Boston suburb. Prosecutors said most were assaulted in their homes when Burbine was substituting for his wife as their caregiver.

Burbine, who was accused of recording the assaults, had pleaded not guilty in December 2012 and was being held on $1 million bail. He offered last year to undergo castration in exchange for a lenient sentence, but prosecutors rejected that.

Prosecutors don't believe his wife knew about the assaults but said she knew he was a convicted sex offender.

Burbine was convicted of indecent assault and battery on a child in 1989 and designated a Level I sex offender, the category considered least likely to reoffend.