An Alberta man who was issued a nearly $300 ticket for using his mobile phone while waiting in line at a Tim Hortons’ drive-thru says the police officer's actions were “heavy-handed.”

A.J. Daoust says, after he replied to a text message while waiting for his coffee at a Beaumont, Alta., Tim Hortons last week, a police officer knocked on his window, asked him to pull over, and gave him a $287 ticket for distracted driving.

"I said, 'In a drive-thru? Really?'" Daoust told CTV Edmonton. "He was definitely within his rights…but to me this is ridiculous. It's just kind of heavy-handed."

The Alberta Highway Traffic Act restricts drivers from using a hand-held cell phone, texting or emailing while behind the wheel. The legislation applies to drivers on publicly and privately-owned property that drivers are permitted to use for the passage or parking of vehicles.

Jeff Kasbrick, vice president of government and stakeholder relations at Alberta Motor Association, said it's up the discretion of the police officer when to issue a ticket.

"There's the classic, that we see all the time, which is at a red light people will sometimes pull out their cell phones," Kasbrick said. "That's considered a distraction."

While Daoust acknowledges what he did, he says he may try to have the ticket fine reduced in court.

"It's stupid," he said. "It didn't have to happen, but I guess that's how it goes."

With a report from CTV Edmonton