Media playback is unsupported on your device Media caption Footage showed shots being fired in Dallas (Source: Twitter user @madwho12)

A gunman has opened fire on the police headquarters in the US city of Dallas, before fleeing the scene in what appeared to be an armoured vehicle.

A police chase led to a tense standoff in a car park for several hours, until police shot the suspect through the front windshield of the van.

Police say the suspect is dead, but have not confirmed the man's identity.

Two bombs left outside the Dallas police HQ in Texas, and two more bombs found inside the van, have detonated.

The motive for the attack is not clear. No officers have been hurt.

Police say the suspect's van caught fire as officers detonated two pipe bombs in the vehicle.

Image copyright Dalls Police Dept Image caption Police released pictures showing gunshot damage to their headquarters

Image copyright AP Image caption Officers and snipers took position outside the car park where the standoff was taking place

The gun attack on the police headquarters began at about 00:30 local time (05:30 GMT) on Saturday.

Initially, police quoted witnesses as saying that as many as four suspects were involved - however, Dallas Police Chief David Brown subsequently said it appeared that only one gunman was involved.

He said that following the shooting, the suspect fled in the van, ramming a police car.

A police chase ended in a car park in Hutchins, about nine miles (14km) from central Dallas.

The van, which was disabled using a police rifle, appeared to have gun ports built into its sides.

Attack timeline

Image copyright EPA/DALLAS POLICE Image caption The suspect rammed into a police car as he fled the scene

00:30 Shots fired at Dallas Police headquarters by a gunman

Shots fired at Dallas Police headquarters by a gunman Suspect in armoured van exchanges gunfire with officers, rams a squad car, then flees

00:44 Van is chased to a car park in Hutchins and there is another exchange of gunfire. Squad cars are again rammed

Van is chased to a car park in Hutchins and there is another exchange of gunfire. Squad cars are again rammed Suspect refuses to leave van but tells police that his name is James Boulware

04:30 One of four bags left at police HQ explodes while being moved by robot

One of four bags left at police HQ explodes while being moved by robot 05:07 Police sniper shoots at suspect through windscreen

Police sniper shoots at suspect through windscreen 13:37 Police confirm suspect is dead

Police say the suspect was a white male, but his identity has not been confirmed.

Mr Brown said the suspect had given his name as James Boulware, and officers had attended three incidents of domestic violence involving a man with that name in the past.

"The suspect has told our negotiators that we took his child and we accused him of being a terrorist, and that he's going to blow us up. And then cut off negotiations."

At 05:07, police snipers shot through the front windshield of the van, Mr Brown said.

Police then sent in a robot equipped with a camera to confirm that the suspect had died, and detonated explosives found in the van.

Image copyright Dallas Police Dept Image caption This squad car was hit by gunfire but no officers were injured

Image copyright AP Image caption Police said remotely operated robots were used to examine suspect packages

Image copyright Dallas Police Dept Image caption Two bags left outside the police HQ exploded

Residents near the police headquarters had been evacuated as a precaution while specialist teams dealt with other explosives left nearby.

One of the bags exploded as a robot tried to move it.

Dallas police said they successfully detonated another device found under a police truck outside the headquarters, while a third package found in a rubbish container had been cleared and was not an explosive.

Maj Max Geron from Dallas police said one officer searching for explosives had almost tripped over one of the bags that exploded.

"Some officers say we are very lucky. I believe we are blessed that our officers survived this ordeal," Mr Brown said.

Media playback is unsupported on your device Media caption Police Chief David Brown: "There are bullet holes in squad cars where officers were sitting"

Joshua Guilbuad, who lives near the police headquarters, told the BBC he was woken by the gunshots.

"It sounded like approximately 200 gunshots going off across the street."

He said police told him and his flatmates to evacuate the building and shortly afterwards there was "a huge explosion which shook the glass in the windows".