A man's decision to fly a plane over his friend's house has resulted in a criminal charge.

York Regional Police say a man rented a plane and proceeded to buzz several neighbourhoods in Richmond Hill on Sunday evening.

Police started getting calls about a plane that was reportedly seen "climbing into the sky, stalling and falling back to low altitudes."

Local resident Jeff Smith had guests over for a dinner party when the plane flew overhead.

It looked like the plane was in trouble.

"It's scary because we thought he was going to crash," Smith told CBC News in an interview.

Attempts to make radio contact with the pilot failed and it was then presumed that the plane was experiencing mechanical trouble.

Police began clearing local roads, so the plane would be able to make an emergency landing.

But the plane landed safely at the airport, where police caught up with the pilot when he landed at Markham Airport, at Highway 48 and Elgin Mills Road.

A 26-year-old Richmond Hill man now faces a charge of dangerous operation of an aircraft.

With a report from the CBC's Michelle Cheung