The only thing a curious black bear in Port Moody, B.C., couldn't figure out early Friday morning was how it would unlock the door of an SUV after it had managed to open it and climb inside, said police.

Just after midnight Friday, a homeowner in the 1300-block of Ioco Road was alerted to the incident by a car alarm going off, said Sgt. Rob Degoey.

But when the homeowner went outside to turn it off, what they found was a bit more than what they felt they could safely handle.

So, they called police.

"Initially, the call was that there was a bear locked in a car. Basically, the bear went into a car, locked himself in it and then set the alarm off, which alerted the homeowner to go outside."

Homeowner videos trapped bear as it begins to rip into his car

A black bear was found trapped in a car in Port Moody, B.C., overnight much to the surprise of the person who stumbled upon it. Police were called and the bear was safely freed. 0:20

Degoey said neither police nor the car owner know how long the bear was stuck inside, but the interior of the 2012 Nissan Rogue took a beating.

"It damaged the entire inside of the car."

Black bear locked inside a Port Moody resident's Nissan Rogue SUV rips into the interior of vehicle, Friday, Sept. 13. (Port Moody Police)

He also said the car doors were left unlocked, which made things really easy for the bear.

"There was no food inside. We don't know what drew the bear to go inside the car, but then he locked himself in."

Degoey said B.C. Conservation Service officers were quick to help with the logistics of releasing the confused bear from the SUV.

"The good thing is the bear was released unharmed back to nature, and I think that's the best part about the whole thing."

This isn't the first time a bear has gotten tangled up with a car. In June, 2013, a homeowner in Maple Ridge, B.C., captured video of a bear standing on its hind legs while opening the door of a truck.

Sgt. Degoey said there are fewer bear calls as the animals head back to hibernation, but people should still take precautions.

"The big message is keeping garbage containers safe and food secure and keeping your doors locked, because you don't know who's going to go inside them."