Two bystanders are being credited with saving the life of a female police officer who was stabbed numerous times during a robbery investigation in Victoria, B.C. on Monday.

The officer was investigating a theft from a 7-Eleven in the 800-block of Douglas Street downtown at the time of the stabbing. The two-year member was alone at the scene.

When she walked out of the store, she was attacked by a man holding a knife, in what police are describing as an unprovoked assault. Police say the man wrestled her to the ground and stabbed her several times.

"By all accounts, it looks like he just attacked her because she was wearing a police uniform," Victoria Police Sgt. Grant Hamilton told ctvbc.ca.

A man driving past the brawl stopped his car and managed to pull the attacker from the officer. Another bystander then stepped in and helped hold the suspect while the first man grabbed the officer's handcuffs to restrain him.

The officer was taken to Royal Jubilee Hospital with serious defensive injuries to her hands and arms and superficial stab wounds on her neck. The injuries are said to be non-life-threatening, but Hamilton said she required surgery Monday afternoon.

Police are offering thanks to the two men for rescuing the officer.

"A heartfelt thanks from our department to these two citizens," Hamilton said. "They probably saved her life."

A 57-year-old man was arrested at the scene. Investigators do not believe he is connected to the convenience store theft, but say he is known to police.