VICTORIA -- The Speaker of the Legislative Assembly of B.C. has won a sweeping injunction preventing anyone from blocking doorways or driveways at the B.C. legislature ahead of planned protests Friday.

The injunction, which was granted at B.C. Supreme Court on Thursday, restricts activists from obstructing, intimidating or interfering with legislative staff, security or government workers on the legislature grounds.

The order authorizes police and special constables to arrest anyone contravening the order, including by blocking roadways or obstructing the view of CCTV cameras on the grounds.

Christohper Considine, the lawyer for the speaker who argued for the injunction, tells CTV News that demonstrators will still be allowed on the legislature grounds.

Anyone detained for breaching the injunction would be released if they agree not to contravene the order again, at the discretion of the arresting officer, Considine said.

The injunction comes as hundreds of protesters opposed to the construction of the Coastal GasLink pipeline in northern B.C. are preparing to blockade dozens of government offices in Victoria Friday morning.

The planned demonstrations would follow actions that saw hundreds of protesters gather at the B.C. legislature Tuesday, blocking entrances to the building as MLAs and staff returned for the start of the legislative session.

Read the full text of the injunction below: