Hungry in the skies, a pilot in Australia landed his helicopter near a McDonald's, grabbed his cheeseburger and flew away, leaving onlookers gasping in surprise.

A video of the incident which, according to local media, took place on Sunday 14 May has gone viral and sparked a debate if the act was illegal.

Civil Aviation Safety Authority (Casa) spokesman Peter Gibson told Australian Associated Press on Monday that the landing was not technically illegal unless the pilot did so without permission from the owner of the land.

"Was it unusual? Yes. Was it unsafe? We're not in a position to say until we've looked at the footage," he said, noting that footage captured by onlookers on their mobile phones will be sent to Casa's operation area in Sydney for review.

The pilot, identified only as Dan by Australia's 9News, landed his chopper on a park next to the Rouse Hill McDonald's outlet in Sydney. He told the channel he did have permission to land on the lawn.

"Every now and then we do that sort of stuff," he said and offered to fly in cheeseburgers for the channel host interviewing him. "Kyle, if you ever need a cheeseburger give us your coordinates of where you live and we'll drop in with it."

Helicopter landing at McDonald's
Screen grab from a viral video that shows a helicopter pilot landing on a lawn next to a McDonald's outlet in Sydney, Australia, to grab his cheeseburger takewayYouTube screenshot

The news channel had reportedly offered Dan a cash award of $1,000 to identify himself. Following the interview, Dan told the channel to donate the money to the Ronald McDonald House Charity, from where he collected his burger.

McDonald's Australia spokeswoman Skye Oxenham said they "welcomed" all customers to their fast-food chain "as long as they arrive and depart safely".