WALNUT CREEK (KPIX 5) – A police chase in Walnut Creek came to a frightening and fortuitous end as the suspect car plowed into a building at the moment an ambulance crew was standing by.

According to authorities, police were chasing the driver of a BMW on eastbound Highway 24 through Lafayette late Wednesday night around midnight. It is unclear why police were chasing this particular vehicle.

The BMW reached speeds up to 140 miles per hour, prompting police to break off the chase.

After officers suspended their chase, police said the BMW took the southbound Interstate 680 off-ramp and lost control. The car went down an embankment, hit a tree, went airborne and flipped, before slamming into a building on Boulevard Circle.

An ambulance crew parked nearby just happened to witness the crash.

“I would say right place, right time, since we didn’t get hit,” paramedic Dave Stiles told KPIX 5.

Stiles said the crash missed them by two feet. His first thought was that he was going to die. “It was really quick. I was really glad to be alive once they went by me,” Stiles said.

The paramedics rushed in to start first aid. “Tell them to stay calm and we’re gonna get them out. That’s really the best thing to do. Because at that point, we were concerned with the integrity of the building,” Stiles recalled.

Firefighters had to shore up the building before rescuing the two people inside the car, a male driver and female passenger. Both driver and passenger were in critical condition as of Thursday morning.

The impact severely damaged four businesses, including a training room for Just Be Yoga. Studio owner Jenni Wendell, who had a class in their late last night, said it was karma.

“Really grateful when it happened, timing wise. And with the paramedics were here. I mean there were so many little signs that are like wow, you have to wonder, there’s something greater than us that’s in charge,” Wendell said.