A Buffalo man who was arrested in a cloud of heroin dust in a hotel room – with his three children – was sentenced Thursday to 2½ years in prison by a judge who scoffed at his parenting skills.

Indaleccio Rodriguez-Escalara, 23, of 14th Street, pleaded guilty last month to charges of drug possession and child endangerment.

In the most recent incident, he flung heroin in a hotel room as Town of Tonawanda police showed up with a search warrant Oct. 30, according to the Erie County District Attorney’s Office.

Rodriguez-Escalara jumped from a bed and flung the heroin, covering the bed and his three children. He told County Judge Thomas P. Franczyk that he accepts responsibility for his crimes and wants to turn his life around and be a part of his children’s lives.

“I would certainly have doubts about having any child in your company,” Franczyk told him.

Lawyers for Rodriguez-Escalara urged the judge to send him to a boot camplike incarceration program, where he would benefit from the intense supervision.

“He is still only 23 years old and has never been on probation,” said defense lawyer Paul G. Dell.

Rodriguez-Escalara has fended for himself on the streets since he was 15, Dell said. “He is sorely in need of education and training if he is ever to make a living.”

The three children – who are not in the custody of their parents – were treated in Women & Children’s Hospital and released.

Police officers recovered more than 6 grams of heroin in the room at the Economy Inn on Grand Island Boulevard, according to the District Attorney’s Office.

The defendant pleaded guilty to charges of fourth-degree criminal possession of a controlled substance and endangering the welfare of a child. He could have faced up to 5½ years in prison.

In addition to the drug charge from the hotel arrest, he was arrested April 4 in Lackawanna and July 4 in Buffalo for drug possession.

Franczyk noted nearly a dozen prior arrests for marijuana and motor vehicle offenses, calling his record “a steady flow of misdemeanor arrests and some convictions.”

If Rodriguez-Escalara is serious about overcoming the drug problem, “you can do it on your own,” the judge told him.

The judge sentenced him to 2½ years for the drug counts and a year for endangering the welfare of a child. The sentences will run concurrently.