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

A man suspected of attacking the Dallas police headquarters with guns and explosives had "snapped" under personal pressures, his father has said.

The suspect identified himself to the authorities as James Boulware, although his identity is yet to be officially confirmed.

He was shot dead in his van by police snipers after a standoff.

His father, also named James, said his son had been angered by losing custody of his son.

"Not being able to get a job and the legal system letting him down, [he] finally snapped,'' the elder James Boulware told Associated Press.

"But I can't say shooting at a police station is right in any way.''

Image copyright EPA/DALLAS POLICE DEPARTMENT Image caption A photo of James Boulware released by Dallas Police

His mother, Jeannine Hammond, told an NBC affiliate her son was mentally ill. He had faced several charges, including for attacking family members.

'Hair-raising'

Police have said they were "blessed" no officers were hurt in the attack, which began in the early hours of Saturday when the man sprayed the Dallas police headquarters with bullets.

He sped off in what appeared to be an armoured vehicle, ramming a police car and leaving behind explosives outside the HQ.

The situation was so chaotic in the early stages some witnesses thought several gunmen were involved.

The suspected attacker was eventually surrounded at a restaurant car park, with police snipers shooting him dead through the vehicle's windscreen.

Dallas Police Chief David Brown said snipers had decided to shoot the suspect after "he became increasingly angry and threatening" during negotiations, and appeared to pose a threat to those around him.

Image copyright EPA Image caption The attacker was shot dead by police snipers in a restaurant car park

Image copyright REUTERS/Dallas Police Department Image caption Damage from the gun attack could be seen in at the headquarters

It took hours to confirm his death with police using robots to inspect the van fearing it had been rigged with explosives.

"There are bullet holes in squad cars where officers were sitting," said Mr Brown. "It raises the hair of the back of your neck just thinking what could have happened."

He added: "I believe we are blessed that our officers survived this ordeal."

The FBI is assisting investigations into the attack, and Dallas police say they are seeking more information about the incident from the public.

"The lone suspect had three family violence cases against him," the Dallas Police Association tweeted. "He was very disgruntled against law enforcement and the criminal justice system."

Attack timeline

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