The town of Hampstead has adopted a smoking bylaw prohibiting people from smoking almost anywhere outdoors, with repeat offenders liable to be fined up to $1,500.

Bylaw 1019 is the one of the most restrictive pieces of anti-tobacco legislation in Canada, covering cigarettes as well as marijuana.

Town council voted 5-2 in favour of the bill Monday night.

The bylaw prohibits tobacco use on all municipal property including: parks, streets, sidewalks, municipal vehicles, municipal buildings and the land adjacent to those buildings.

Fines range from $250 to $750 for first time offenders and from $500 to $1,500 for repeat offenders.

Residents will still be able to smoke in their backyards and electronic cigarettes are exempt from the bylaw.

Mayor Bill Steinberg said federal plans to legalize marijuana pushed the town to take action.

"Pot is what got us thinking about this right now, but it's really for all types of second-hand smoke," he said when the ban was proposed.