Montreal's mayor is expressing shock after a photo of a Nazi flag being waved during a May Day demonstrations was posted online.

City police were notified after a picture of a man brandishing the flag from the roof of a condo building was posted on the Parc-Ex Action Squad, a Facebook page for a neighbourhood group.

The building was quickly identified and it was discovered the roof was accessible only by key.

Mayor Valerie Plante weighed in on Twitter.

"I am deeply shocked by this hateful gesture, which in no way reflects the values of inclusion and respect dear to Montrealers," Plante said.

"Montreal is an open and welcoming city: intolerance and racism have no place."

Canada doesn't have any laws on the books restricting ownership or display of Nazi flags, but hate laws give police the right to intervene if they are used in the communication of hatred.