A pre-kindergarten classroom filled with 11 children in New Haven was hit by gunfire after a shooting outside the school left a man injured Monday morning.

The man, who had dropped off a child at the Catholic Academy of New Haven, was shot several times outside the building but is expected to survive, police said.

Police also said the victim, whose identity was not released, had been acquitted of a murder charge and was recently released from prison. He was a suspect in "numerous" shootings, they said.

Officials said he was an acquaintance of the student's mother and a caregiver for the child.

Authorities were searching for the shooter Monday afternoon. The motive wasn't immediately clear.

Of the 10 shots fired, seven hit the school building, with one bullet entering a pre-kindergarten classroom, the Archdiocese of Hartford said in a statement.

The archdiocese praised faculty and staff at the school for how they executed the crisis plan, which included a lockdown.

“I had to find out on social media that bullets went through the classroom,” one student's parents told Hartford’s FOX 61. “I wasn’t informed of that through the school.”

ARMED WISCONSIN HIGH SCHOOL STUDENT, RESOURCE OFFICER INJURED IN SHOOTING INCIDENT

Assistant Police Chief Renee Dominguez said the shooter had no regard for children and adults at the school.

"Whatever the beef is between the innocent victims and the suspects, the community was put in danger here," she said.

CLICK HERE TO GET THE FOX NEWS APP

Dominguez added the victim will no longer be allowed to care for the child.

The Associated Press contributed to this report.