A 36-year-old teacher who allegedly molested five young girls in their Brooklyn school says he is innocent and insists he loves his students, his lawyer said in court Thursday.

Omil Carrasquillo, of Selden, Long Island, was held on $50,000 bail in Brooklyn Criminal Court on Thursday, and charged with "inappropriately touching" the 9 to 11-year-old girls, prosecutors said.

Carrasquillo, a science teacher at P.S. 249 The Caton School, allegedly molested his students several different times inside the school, touching one of the girls once or twice each month, prosecutors said.

One of the girls complained to the dean of the Flatbush school and Carrasquillo was fired after an investigation, prosecutors said.

"He loves teaching school," said his lawyer, Gregory Esposito. "He loves students."

"He denies the charges," Esposito added. "He's completely thrown off by any of this. He's shocked, he's completely shocked."

Carrasquillo has a wife and a 7-year-old son, Esposito said, and served in the U.S. Army for eight years. He was a teacher for another eight years, he said.

"He served honorably," Esposito said. "When our country was at war, when our country was in trouble, Mr. Carrasquillo he ran to the problem. He went voluntarily. And that's how he chooses to fight this case."

Carrasquillo was removed from the school last Friday after the Department of Education learned about the allegations, said spokeswoman Devora Kaye.

"He no longer works for the department and is not eligible for future employment," she said in a statement. "We are investigating the matter and supporting this school community."