A suspect in an overnight attack on the Dallas Police Department's headquarters was shot and killed by a police sniper after being cornered by authorities Saturday morning.

The sniper shot the man following a standoff of several hours in a restaurant parking lot in the suburb of Hutchins, where he had fled in a van after the early-morning shootout outside of police headquarters near downtown Dallas, Dallas police Chief David Brown said at a news conference.

Investigators found a package containing pipe bombs in the parking lot of the headquarters building and the suspect told police negotiators that he had C4 explosives in the van, Brown said. The chief said police had to use a camera-equipped robot to inspect the van and to try to determine if the suspect was alive or dead. Police also planned a series of controlled detonations.

Shortly after Brown spoke, several explosions could be heard close to where the van was parked and officers could be seen approaching the vehicle.

Brown said investigators believe the man acted alone, even though early witness reports suggested there could have been as many as four attackers. Brown said the suspect apparently moved quickly during the attack, which may have given the impression that others were involved.

Cellphone video shot from a balcony or roof near the headquarters building showed the suspect's dark-colored van ram a squad car as gunshots ring out. Brown said shots struck several squad cars, but nobody except for the suspect was shot or injured during the hours-long confrontation.

Bullets pierced the glass of the headquarters entrance and caused damage inside, including at the front desk, where the employee on duty had gone to get a soft drink right before the bullets started flying, Brown said.

In an earlier news conference, Brown said the suspect had identified himself as James Boulware and told police that he blamed them for losing custody of his son and "accusing him of being a terrorist."

After announcing police had shot the suspect, Brown said investigators were still trying to confirm his identity, pointing out that the suspect could have been lying about his name earlier.

A police spokesman, Maj. Max Geron, said investigators think the suspect fired an unknown number of shots from his van while it was parked in front of police headquarters, which is across the street from a boutique hotel and a popular bar that was still open. He said the suspect then apparently began firing on squad cars before he rammed his van into one of them.

Anita Grendahl was asleep in her 7th floor apartment in a high-rise across from police headquarters when she heard gunshots loud enough to wake her up over a white noise machine in her room.

"We just woke up to a few pops and thought somebody was on my balcony, and then looked outside and saw the van crash into the car," she said.

Ladarrick Alexander and his fiancee, Laquita Davis, were driving back toward the police station to their nearby apartment when they heard 15 to 20 gunshots in quick succession.

Seconds later, police could be seen swarming an unmarked van that appeared to have crashed into a police car, they said.

They turned around and were parked outside the police perimeter about two blocks away, where they heard the sound of one detonation at about 4:30 am and smoke coming up in the air.

Police headquarters is in a former warehouse district where a boutique hotel and several new apartment buildings have been opened.

"We don't see too much going around here at all," Alexander said.