An attempt to get the perfect selfie has proven costly — and a little painful — for two men driving on Highway 99 Sunday.

A West Vancouver police officer in an unmarked cruiser spotted the car carrying the two men speeding and swerving on the road.

As the officer moved into position to pull the car over, the passenger popped through the sunroof with a cellphone and started taking video.

Seconds later however, the passenger was startled by the sound of the siren, and proceeded to drop the phone, which smashed onto the highway.

At the same time the driver hit the brakes causing the phone-less passenger to bang his head and shoulders on the edges of the sunroof as he tried to get back into his seat.

The driver received a $196 speeding ticket while the passenger was fined $167 for failing to wear a seatbelt.

West Vancouver Police say the passenger suffered "possible bumps and bruises" and a lost cellphone, but was otherwise unharmed.

The car was reported to be driving 40 kilometres over the speed limit.