A police officer in South Florida was shot Friday morning in what authorities described as an ambush and attempted assassination.

The officer in Miami Gardens, Fla., suffered a non-life-threatening wound and was able to call for help, prompting a gunfire-filled chase that stretched out across more than two miles of the suburban city.

“At the end of the day, this tragedy was not that bad because we didn’t lose an officer,” Antonio Brooklen, chief of the Miami Gardens police, said at a news conference Friday, standing not far from where the chase ended. “It’s bad that he was shot, but I thank God we’re able to talk about this as a tragedy of an officer injured and not me having to notify a family that we’ve lost an officer due to gun violence.”

The shooting comes a little more than two weeks after a Philadelphia officer sitting in his car was shot multiple times by a man who authorities said claimed he carried out the attack in the name of the Islamic State. And it comes days after two police officers were shot and killed, the first slain in the line of duty so far this year.

Brooklen said that the Miami Gardens officer, who was not immediately identified, was sitting in a parking lot at 183rd Street and 7th Avenue and filling out an accident report when the shooting occurred.

Shortly before 8:30 a.m., Brooklen said the officer saw a black BMW SUV unrelated to the earlier accident pass by and he made eye contact with the driver.

The driver then “backed up and ambushed the officer,” firing into the police car, Brooklen said. The officer dove down into his car and was hit once on a lower extremity, Brooklen added.

Immediately after, the officer began following the SUV and got on the police radio and called in a description of the car, the driver and where it was heading, Brooklen said.

Several other Miami Gardens police vehicles joined in the chase, which ultimately stretched along about two and a half miles of a quiet suburban street, lined with single-story homes not far from the stadium where the Miami Dolphins play.

At two points during the chase, the driver of the SUV leaned out the window and fired multiple rounds at the officers who were chasing him, hitting their cars but not hitting any of the officers, Brooklen said. None of the officers returned fire, he said.

The SUV eventually drove into the intersection of 183rd Street and 32nd Avenue, where it crashed into another car. The driver got out and ran away, but Brooklen said he was captured and taken into custody in a house’s yard.

The driver of the SUV was not immediately identified, Brooklen said.

Brooklen praised his officers for “an outstanding job,” noting that other than the officer who was initially shot, no one else was hurt.

But he linked the shooting both to violence against police officers in general as well as violence in general, decrying a bloodshed that he said touched all levels of society.

“I must say that the violence against police officers in this country must stop,” he said. “The violence against children must stop. The violence against our community must stop. No one is exempt from violence.”

Six days before this incident, two officers were killed in Utah and Ohio. The officer in Utah was shot and killed chasing someone who had fled a traffic stop, while the Ohio was found dead after authorities received a report of a threat to police, according to law enforcement officials.

After these shootings, U.S. Attorney General Loretta E. Lynch said she was “appalled and deeply saddened by the recent shooting attacks against law enforcement officers” in those states and the earlier Philadelphia shooting.

“These heinous assaults are reminders of the difficult jobs that our brave law enforcement officers perform every day and of the dangers that they willingly face in the service of their communities,” Lynch said in a statement.

Police officers have described feeling increasingly anxious amid ongoing protests over how law enforcement uses deadly force. However, concerns about officers being targeted for ambushes predates widespread demonstrations focusing on policing. A study released last year by the Department of Justice examining ambushes or planned attacks between 1990 and 2013 said that concerns about violence targeting officers were on the rise.

The study also said that while the number of ambush attacks was steady over the period examined, the proportion of fatal attacks attributed to ambushes increased.