ST. IGNACE, Mich. (Michigan News Source) – A federal judge has given Enbridge Energy three years to shut down a section of its Line 5 oil and gas pipeline that crosses reservation land.

MORE NEWS: School Employees Paying For Health Coverage, But It Isn’t As Much As The Rest Of Us

In addition, U.S. District Judge William Conley ordered the Canadian-based energy company to pay a Native American tribe more than $5 million for trespassing.

The judge’s order comes after members of the Bad River Band of Lake Superior Chippewa said river erosion has created an immediate risk that the pipeline will be exposed and rupture on reservation land.

Enbridge Energy plans to appeal, and is requesting support for a three-year plan to reroute the pipeline. Enbridge said the long-term solution to the dispute will be a 41-mile reroute of the pipeline. However, company officials said that project hinges on “timely government permit approvals” to allow the three-year project to be completed on time.

Line 5 transports 23 million gallons of oil and liquid natural gas each day, including to many residents in Michigan’s Upper Peninsula.

The company is spending $500 million of its own money to build a tunnel to encase the pipeline in the Straits of Mackinac to prevent a potential spill. Gov. Gretchen Whitmer and Attorney General Dana Nessel have been outspoken opponents of the pipeline and are trying to shut down Line 5 with legal action. Gov. Whitmer has not offered a viable alternative option for heat and energy if Line 5 is shut down.