After years of protests, uncertainty and political wrangling, the Quebec government has officially put an end to plans of drilling for oil and gas on Anticosti Island.

Premier Philippe Couillard has issued a ministerial order banning drilling on the island in the Gulf of St. Lawrence.

The government is also compensating three oil and gas companies a total of $41 million dollars for cancelling their permits.

Corridor Resources, Saint-Aubin E&P and Junex have all reached agreements — but a fourth company, Petrolia, has not.

The companies had signed agreements with the previous Parti Québecois government in 2014, but the Liberal government decided the following year not to go ahead with the plan.

​Local leaders, First Nations and environmental groups have also been resisting the project and welcomed the decision.

Anticosti Mayor John Pineault said the ministerial order puts an end to a long two-year battle against drilling for oil and gas.

"It's a victory for island residents, but more importantly it's a huge victory for all of Quebec," he said.