The five police officers shot and killed by a sniper during a protest in Dallas have been named as: Senior Corporal Lorne Ahrens, Michael Krol, Sergeant Michael Smith, Police Officer Patrick Zamarripa, and Police Officer Brent Thompson, of the Dallas Area Rapid Transit Police Department.

Seven other officers and two civilians were wounded during a Black Lives Matter rally in the city as a lone sniper opened fire on police officers who were providing security for the event which was attended by over 800 protestors.

Brent Thompson, 43, is the first person killed in the line of duty since the department formed in 1989. Thompson joined the team in 2009. A newlywed, he married a fellow officer two weeks ago. He was also a grandfather.

Dallas Police Officer Patrick Zamarripa had served three tours in Iraq before becoming a police officer. The father of two described himself on social media as a father, sports fan, and proud Texan, who was "addicted to the thrill of this job."

A native of Michigan, Michael Krol moved to Dallas in 2007 to join the city's police department. "He always wanted to be a cop," Brian Schoenbaechler, Krol's brother-in-law, told The Detroit News.

Relatives of the fourth victim, father of two, Michael Smith, 55, revealed he had recently been asked about retiring, but said he intended to continue to serve in the police force .

Lorne Ahrens served with the Dallas Police Department for 14 years, according to the Dallas Morning News. His father-in-law, Charlie Buckingham said the 6-foot-5, 300-pound former semi-pro football player was hard to miss. "He was a big ol' boy," Buckingham said. "Big as he is, just walking down the street he cut a real figure. I'm sure it helped him in his work."

DART said that three officers — Omar Cannon, 44, Misty McBride, 32, and Jesus Retana, 39 — were also shot during the protest, but are expected to recover from their injuries.

The bloodshed marked the deadliest day for law enforcement in the United States since the September 11 terrorist attacks of 2001.

"Our worst nightmare has happened," Dallas Mayor Mike Rawlings said. "It is a heartbreaking moment for the city of Dallas."

President Barack Obama says 'justice will be done' after the Dallas police shootingsReuters

The shooter, identified as Micah Johnson, was killed after a 12 hour stand-off with police, using a bomb detonated with a robot, after he was heard shouting that he "wanted to kill white people, especially white officers."

The White House has claimed that Johnson was a lone attacker with no terrorist links, who it is believed was acting out of revenge for the killings of two black men - Alton Sterling and Philando Castile - by police this week.

Describing his "devastation" at the killing of five police officiers, the organiser of the rally Reverand Jeff Hood said it was intended to be a peaceful demonstration.

President Obama said 'justice will be served' and those responsible will be held 'fully accountable.'