Follow CBSMIAMI.COM: Facebook | Twitter

MIAMI (CBSMiami) – Two shootouts involving police, a cop carjacking and a chase ended with a Miami cabbie being taken into custody.

READ MORE: Florida Sheriff's Deputies Cleared In Shootout With Two Children

Dramatic cell phone video taken by Hector Cordero from his apartment on Sans Souci Boulevard in North Miami showed officers in a “takedown” of the suspect, as police sirens were blaring. He also took photos of a rifle that police said the suspect used.

“It gave me goose bumps,” said Cordero. “It was very scary. I heard what sounded like firecrackers, pow, pow, pow. he came by our apartment and we looked out and saw him. Then he started shooting at the officer. I ran in the bedroom and I heard four rounds. He was shot and he fell. He was hit four times.”

Miami Fire Rescue said it began when a cab driver got upset at the cab company, located at 199  NW 79th Street, and started breaking things. He then sped off in a taxi.

A police officer in the area spotted him speeding at NW 79th Street and 4th Avenue and moved in to make a traffic stop.

A law enforcement source told CBS4’s Jim DeFede that the officer had only been with the Miami Police Department for the past nine months and had been on patrol alone for just the last three months. He is married with a young child.

CLICK HERE to watch Peter D’Oench’s report

“The taxi cab driver exited the vehicle and opened fire on the officer with a high-powered rifle,” said City of Miami Police Officer Frederica Burden.

Sgt. Freddie Cruz told CBS4’s Peter D’Oench that, “A gentleman came out of the rear of the taxi and there was an exchange of gunfire and the officer fired back. At any given moment, there could have been children in the area. And this was a danger to law enforcement.”

A woman passing by the scene was hit and taken to the hospital, according to police.

Broadcastify captured the dramatic moments of police radio transmissions, with one dispatcher saying,

“Shots fired in the area of 4th and 79th. Use caution. I believe the suspect took off in a patrol vehicle. The offender possibly took off in a patrol vehicle.”

“We were just pretty much trying to get everybody to take cover and duck and hide because it must have been at least 30 or 40 shots back to back to back to back,” witness Rachel Ambrose said.

As the officer returned fire and ran for cover, a person driving by in a van shielded the cop with his van. He picked the cop up and drove him to safety.

READ MORE: Tracking The Tropics: Two Systems In The Atlantic Could Become Tropical Depressions Over The Next Few Days

A law enforcement source identified the good Samaritan as William Ramirez and said he was in his mid-40s.

“Our officer returned fire and a good Samaritan provided cover and rescued him while the offender continued to shoot at him with an assault rifle,” said Javier Ortiz, President of the Miami Fraternal Order of Police. “The Fraternal Order of Police wants to thank this good Samaritan for putting his life on the line to save one of our brothers.”

“That good Samaritan is a hero,” said Ortiz. “No doubt he is a hero. He helped this officer through thick and thin in a war zone. Some people would just pick up a cell phone and take video but this man helped.”

Ortiz said he would try to see if the Miami City Commission would honor the good Samaritan with a commendation.

Detectives say the cab driver then jumped into the running police cruiser and took off.

During the chase a police car was involved in a fender bender at NW 7th Avenue and 95th Street.

With Miami and North Miami police closing in, the gunman bailed out of the car near Biscayne Boulevard and 95th Street.

The cab driver once again started shooting. During that shootout another innocent woman was hit–as well as the gunman.

The suspect was taken into custody near San Souci Boulevard and NW 115th Road at the Tropicana Apartments.

Chopper4, over the scene, showed paramedics working on him. The gunfire left a bullet hole in the wall of the complex and a bullet also struck a police car there as well.

North Miami Police spokeswoman, Natalie Buissereth, said, “While here the subject made contact with our officer and there was gunfire. Our officer returned fire, neutralizing the subject.”

The suspect was airlifted to Jackson Memorial Hospital.

The law enforcement source told DeFede that the suspect is in critical but stable condition after surgery. It’s expected he will be charged with at least two counts of attempted murder on law enforcement officers.

MORE NEWS: Miami Weather: Steamy Sun In The Morning, Scattered Showers Later

The two other victims shot did not suffer life-threatening injuries

Peter D'Oench