NBCConnecticut.com A man exposed himself to parishioners at St. James Catholic Church in Killingly, Conn. on Wednesday.

A Connecticut man was facing several charges after police said he barged into a church naked and exposed himself to parishioners and a third-grade class Wednesday afternoon.

The incident happened around 2 p.m. at St. James Catholic Church in Killingly, Conn.

The Rev. John O’Neill told NBC Connecticut that the man got in through a front door that was supposed to be locked.

Police arrested Gary Pohronezny, 41, of Brooklyn, Conn., at the church. O’Neill said Pohronezny was known to police.

Parent Tracy Caffrey said her young daughter was inside and saw everything.

“It's very scary. Your heart stops a beat for a minute or two,” Caffrey said. “She said it was scary. She said it was sudden.”

Read more news from NBC Connecticut

The stranger allegedly exposed himself to a third-grade class from the St. James School a few feet away. The kids were in the middle of Mass practice, and parishioners were also on hand.

“They were definitely distraught,” Caffrey said.

The teacher inside the church did everything she could to protect her students, O’Neill said. “She told the man to leave and told the kids go to the school immediately.”

While the scare at the church was tough for families to deal with, they were grateful no one was hurt.

“Very thankful, especially after everything that's happened lately,” Caffrey said.

They were also thankful the unwanted visitor was put behind bars.

Watch US News crime videos on NBCNews.com

After police made the arrest they went back to the St. James School and talked to the children, saying their goal was to calm fears and make sure the kids felt safe.

Pohronezny was charged with 20 counts, including disorderly conduct, risk of injury to minors and interfering with police. A court appearance is scheduled for Jan. 10.

A Connecticut State Police spokesman told NBC News on Thursday morning that Pohronezny was undergoing a psychological evaluation.