An RCMP officer on medical leave has been charged with first-degree murder in the stabbing death of an Ottawa police officer outside a local hospital.

Kevin Gregson, 43, was charged Tuesday night with first-degree murder, robbery and using an imitation firearm in the commission of an offense, in relation to the death of Const. Eric Czapnik.

Czapnik, 51, was stabbed to death early Tuesday morning outside the Civic Campus of the Ottawa Hospital, as he sat in his police cruiser taking notes.

He had immigrated to Canada from Poland in 1990, was married, and a father of four.

He joined the Ottawa police force in 2007. His father was a police officer in Poland for more than 30 years.

The officer was sitting in his cruiser around 4:30 a.m. ET, writing in his police notebook, when he was ambushed by a single man, apparently at random, and stabbed to death, police said.

"There was nothing extraordinary about the incident until (Czapnik) interacts with the accused," Ottawa Police Chief Vern White said.

The suspect was apprehended and held down by four nearby paramedics, including two women. The paramedics tried to revive the officer, but were unable to. He was pronounced dead at about 5:30 a.m, about 90 minutes before his shift was due to end.

White praised the assistance from the paramedics and said they were "essential" to apprehending the suspect.

"Without their assistance, I don't know what would have happened next," he said. "There were heroic in the way they handled the situation."

Footage of the scene showed a flashlight, gun, notebook, a single glove, two knives and a large stain of blood on the salt-covered pavement.

White said there was no connection between Czapnik and the accused.

Gregson, 43, used to work for the RCMP at their Regina headquarters. In 2006, he was arrested for pulling a knife on a Mormon church official in Regina.

He received a conditional discharge after explaining to the court that he had recently undergone brain surgery for cysts on his brain.

A visibly shaken White told a morning news conference that Tuesday's incident is "an overwhelming tragedy."

"Police forces are like family," White told CTV News Channel later in the morning. "We often fight and argue but always, there is this bond and connection like families have."

He said this incident will be most difficult on the officers from the same platoon as the deceased officer.

"It'll be a tough time, particularly over the next few days as they try to work through their own emotions and get through the morning," he said.

Flags outside the Ottawa Police headquarters on Elgin St. are flying at half-staff.

This is the first time an Ottawa police officer has been killed in the line of duty since October 1983 when Const. David Utman, 38, was shot during an altercation at a shopping centre.