A former Pittsburgh Public Schools elementary school teacher charged with sexually assaulting a student in a classroom denied the allegations Thursday while testifying in his own defense at trial.

Asked by his attorney, Blaine Jones, if he committed the crimes of which he is accused, James Ziegler replied, “Absolutely not.”

Ziegler said he also denied the allegations while being interviewed by Pittsburgh police, calling the charges “outrageous” and “ridiculous.”

Police last year arrested Ziegler, 42, of Pittsburgh, on six criminal counts, including involuntary deviate sexual intercourse with a child and sexual assault.

The trial in Allegheny County Common Pleas Court opened Wednesday.

Ziegler was a fourth grade teacher at Pittsburgh Faison K-5 in the city’s Homewood section.

Police accused Ziegler of sexually assaulting a boy multiple times while the two were alone at the school.

The boy testified Wednesday and described the alleged attacks in detail. He said they took place inside a classroom at the school on Tioga Street.

TribLive does not identify alleged victims of sexual assault.

The boy said he told his mother about the attacks in December 2022, and he said they had been occurring since that August.

“My mom said my brother would be going to Faison, and I didn’t want the same thing happening to him,” the boy told the jury.

The boy said the attacks occurred when the two were alone. He could not cite specific dates or the number of times the alleged attacks occurred.

On Thursday, Ziegler testified that he had been in contact multiple times with the mother of the boy. Ziegler said the child had not been attentive.

“It wasn’t pleasant — not at all,” Ziegler testified of their interactions.

Ziegler said he learned of the allegations when he received a call from the principal of the elementary school asking him if he was alone.

“I didn’t know how to respond,” Ziegler said. “I was devastated, I was confused, I was angry.”

Ziegler said it was then that he he was told he had been placed on administrative leave.

At the time, he had just been promoted to vice principal at Faison.

He said that he was asked to come in and tell his side of the story.

Ziegler chose to speak to police and sat for a two-hour interview with a detective.

“You don’t need a lawyer to tell the truth,” Ziegler said. “I would’ve stayed there for as long as I had to.”

Ziegler said he first found out from the news — not the police — that he was being charged with crimes.

“(I) got a phone call that I was on the news,” Ziegler said. “I was extremely angry.”

After calling his girlfriend to ask her to take care of his daughter, Ziegler turned himself in, he said.

Ziegler told the court that he was a teacher for nearly 20 years after graduating from Duquesne University and then getting a master’s degree at the University of Pittsburgh.

Jurors are expected to return Friday morning for closing arguments from each side before Judge Bruce Beemer.

Megan Swift is a TribLive reporter covering trending news in Western Pennsylvania. A Murrysville native, she joined the Trib full time in 2023 after serving as editor-in-chief of The Daily Collegian at Penn State. She previously worked as a Jim Borden Scholarship intern at the Trib for three summers. She can be reached at mswift@triblive.com.