A pregnant woman in Canada was fatally hit by a car on a crosswalk near a hospital Wednesday, but she was able to survive long enough to deliver her baby.

CBC reported that a 27-year-old woman was hit at around 10:15 a.m. in Quebec City. She was rushed by emergency workers to the hospital, where she gave birth before dying from her injuries.

>> Read more trending stories

A man who was crossing the street at the same time told CBC that he saw the woman fly into the air after the car hit her. "I heard a car coming really fast," Emmanuel Savoie said. "It happened in just a second or two. I reared back, to avoid getting hit by the car. The next thing I saw was a woman go flying two or three meters up in the air."

Another witness, Rémi Laberge, told CBC that the woman was hit straight on and “flew up into the air like a rag doll.”

The 20-year-old driver “may have suffered some kind of illness” and was taken to the hospital to be treated after the crash, CBC reports. Another person in one of two vehicles that were hit also was injured.

The newborn appears to be doing well, the Toronto Star reports.