An Ontario court has granted an injunction preventing an unsanctioned car rally planned for the Labour Day weekend from being held in the Town of Wasaga Beach.

Local officials and police have been preparing for the H2Oi car rally that's expected to take place between Sept. 1 and 4, implementing several measures to prevent the event from going ahead.

In its application seeking the injunction, the town stated that the illegal event "has resulted in public and private property damage, danger to public safety, and was a nuisance to the public generally" in previous years.

Last year, nearly 200 charges were laid in connection with the event. Police reported damaged properties, including two big box stores, and the smashing of windows on two occupied police cruisers.

The town argued that the rally violates its bylaw prohibiting vehicular nuisance events and would threaten public safety.

In his ruling, the judge said there is compelling evidence that car rallies held in Wasaga Beach in the last two years resulted in significant police costs, arrests, and damage.

"The evidence from the past can predict the future and in this case it is more than predictable that the anticipated car rally will simply be a repeat of the car rallies in the past," the judge stated.

In a statement on Wednesday, the Town of Wasaga Beach said the injunction will add to the tools it can use to address the event.

"The granting of the injunctions supports the town's position that contraventions of municipal bylaws negatively impact the health, safety, and well-being of residents and visitors," the statement read.

The order also gives the Ontario Provincial Police (OPP) the authority " to arrest and remove any person with knowledge of the order and who is contravening or has contravened any part of the order."

Ahead of the rally, Wasaga Beach and the OPP announced there will be road closures and vehicle checkpoints to discourage people from attending. Modified vehicles will also be prohibited in the community over the long weekend.

"We will do everything in our power to keep them out," the town said in a news release on Tuesday.

"We welcome visitors to come celebrate the last long weekend of summer in Wasaga Beach, but ask that you leave your modified cars at home."

Residents and visitors are being advised to avoid areas where there will be heavy police presence.

"Any time the Town and our partners, including the OPP, become aware of unsanctioned events that may be heading our way, Wasaga Beach residents, businesses and visitors can be assured we have a plan," said town Mayor Brian Smith.

"Expect to see some road closures and traffic diversion measures in effect, together with a coordinated, stepped-up police and municipal law enforcement presence in the community today, and throughout the long weekend."