A man shot and killed two woman, as well as injured two Capitol police officers, at the New Castle County Courthouse in Wilmington, De. on Monday at 8 a.m., NBC reported.

The shooter, David T. Matusiewicz, was in a bitter and long custody battle with his ex-wife, according to NBC. 

Although Wilmington Mayor Dennis Williams said one of the women slain was Matusiewicz's ex-wife, police Sgt. Paul Shavack said police have not confirmed that, according to The Associated Press.

Delaware Attorney General Beau Biden told the Associated Press at an afternoon news conference that the shooting resulted from the custody battle.

"It's developed out of a long, over the course of many years, custody dispute in the courts of this state," Biden said.

Upon receiving news of the incident, police closed surrounding streets, and local schools went on lockdown. Visitors and courthouse employees inside the building ran for cover, NBC reported.

"I saw the gentleman and a bunch of ladies and people running out of the court building and I just hear all the bam, bam, bam, so I ran too," Irvin Neal, who was on his way into the courthouse, told NBC. "And the gentleman that passed me told me not to go in there."

Neal and a group of other people ran up the block, but the man who warned Neal away came face-to-face with the gunman, NBC reported.

"And he told me that the shooter pointed the gun at him, passed him by and shot everybody else," Neal told NBC.

Matusiewicz, who was divorced, was due in court this morning for a child custody hearing, according to NBC. The station reported that he was convicted in 2009 of kidnapping his three girls -- one five-year-old and her sisters, both two at the time -- taking them to Nicaragua where they stayed for 19 months until Matusiewicz found.

According to NBC, it's not currently clear if police killed Matusiewicz or he took his own life. Two women were killed and the two injured police officers were taken to the nearby Christiana Hospital, with non-life-threatening injuries, NBC reported.

Some present at the courthouse were shocked that a gun-wielding person would even be able to gain access to the courthouse, because of the high security levels.

"When I first heard about this, my first thought was that the only way someone could have gotten in there was to avoid the metal detectors, which is very hard to do, or go in firing," defense attorney Brian Chapman told NBC, adding that there are eight to 10 Capitol police officers on security detail inside the building. "There are at least four or five rows of metal detectors when you go in, you put your belongings through, then you have to walk through the metal detectors. Then there are usually eight to ten police with wands checking everyone and after that you still have to walk by a desk where capitol police sit."

Although the investigation has only just begun, a state police spokesman said the gunman started firing even before he made it to the metal detectors, according to NBC. 

Police think the shooter acted alone, but they're searching every room on the courthouse's 12 floors as standard procedure -- and police teams with search dogs are also going through nearby buildings, according to NBC. 

Delaware Governor Jack Markell, who wasn't on the scene, expressed his thoughts about the violent act.

"Our thoughts and prayers right now are with the victims of this senseless violence and the Capitol police officers who put their lives on the line to protect the courts and public every day," he told NBC.