One of the suspects engaged in a standoff for several hours with police, but officials later announced an end to the standoff.
Here is a look at how the ambush unfolded.
Thursday eveningHundreds gathered peacefully in Dallas to protest police shootings of two black men this week - Alton Sterling in Louisiana and Philando Castile in Minnesota - according to the Dallas Police Department.
There were 100 Dallas officers on the scene for the demonstration.
Dallas police tweeted a photo of officers posing with a demonstrator.
Thursday, about 8:45 p.m. Central timeGunfire began as at least two snipers fired on police from elevated positions.
Officers scrambled to secure the scene and move protesters away.
Five officers were killed, and seven other officers and two civilians were injured.
Friday, 12:30 a.m.Dallas Police said at a news conference that three suspects - two men and a woman - were in custody.
The two men were taken in after one of them was seen carrying a camouflage bag and walking quickly down Lamar Street in downtown Dallas. The individual then threw the bag in the back of a Mercedes and sped off. Police followed the vehicle and performed a traffic stop.
The woman was taken into custody in the vicinity of El Centro parking garage.
Friday, 3:35 a.m.A Dallas city official confirmed to ABC News that the standoff at El Centro Garage was over.
Friday, 6:00 a.m.Dallas Mayor Mike Rawlings said the suspect involved in the standoff at El Centro Garage was killed after police explosives "took him down."
Texas Attorney General Ken Paxton told ABC News that the three other suspects remain in custody and police are still investigating.
"It's very surreal," he said. "It's nothing like I've ever seen in downtown Dallas."