Follow CBSMIAMI.COM: Facebook | Twitter

OPA-LOCKA (CBSMiami) — A quick-thinking police officer rescued a woman trapped in a burning car in Opa-locka.

READ MORE: Dolphins QB Tua Tagovailoa: 'I Don't Not Feel Wanted'

Police said the woman was driving in the rain Sunday morning when she lost control of her car and slammed into a tree.

“When I looked out the window, I seen this car coming and I just heard the bang and looked out the window,” said Candido Cardona. “And there she was, wrapped up on the tree there.”

READ MORE: 'I Can't Believe It's Been Three Years:' Community Prepares To Remember, Reflect On Tree Of Life Shooting

As the rear of the vehicle then caught fire, and smoke began to fill the car, an Opa-locka officer used a fire extinguisher to smash through the car’s window and free the driver.

“The officer acted real fast with the fire extinguisher,” said Cardona.

By sheer coincidence, the woman’s husband drove by the accident while on his way to work and pulled over.

MORE NEWS: Police: South Carolina Woman Kidnaps Son, Takes Him To Miami

The woman was hospitalized in critical condition.