FARGO, N.D. — The Minnesota Department of Natural Resources announced Thursday it has granted a permit — with conditions — for an updated plan to divert the Red River to protect flood-prone Fargo and nearby Moorhead, Minnesota.

The diversion is a 30-mile (50-kilometer) channel that would largely divert floodwaters around the North Dakota city, as well as a dam to save the metro area from flooding.

The DNR denied a permit for the original diversion plan in October 2016, responding to complaints about the potential impact on the environment, as well as concerns that farmland in Richland County in North Dakota and Minnesota's Wilkin County to the south of the cities would be sacrificed in the plan.

Under the new plan — which was submitted by the Fargo-Moorhead Diversion Authority and followed by a period of public comment — the proposed flood plain behind the dam is more than 7,000 acres smaller in Minnesota and some of the floodwaters would be diverted through the cities rather than washing out farmland.

Mary Scherling, incoming chair of the diversion authority's board, said the project is critical for "our citizens, economy, and the future" of the Red River Valley.

"This is a major milestone for the project, but we still have a long way before we cross the finish line," she said.

The idea for a diversion channel gained momentum after a record-setting 2009 flood that destroyed about 100 structures and caused millions of dollars in damage. Fargo, which sits lower than Moorhead, was saved only by a massive sandbagging effort by 100,000 volunteers involving more than 7 million bags.

DNR commissioner Tom Landwehr said Thursday that the new plan balances the need to reduce the flood risk with protecting public safety and the environment.

"Unfortunately, it isn't possible to build a large flood protection project without adversely affecting some people, and the Fargo-Moorhead diversion project is no exception," said Landwehr said.

Opponents filed a federal lawsuit in 2013 and won an injunction to stop construction of the original design, saying the project was too expensive and that the dam would flood too much land south of Fargo and Moorhead.

Nathan Berseth, spokesman for the opponents, said "it's doubtful" the injunction will be lifted until the diversion authority meets the more than 50 conditions imposed by the DNR permit, governing project design, construction, operation, and maintenance.

"This project could be tied up in court for several years if the leadership of the diversion authority continues in their brash ways and disregard for local authority," Berseth said.

Lawyers on both sides will meet next month to discuss the injunction.

Diversion officials say changes to the plan and construction delays have increased costs by $600 million, to about $2.75 billion. Fargo Mayor Timothy Mahoney noted that Fargo and Cass County citizens have made flood protection one of their top priorities by approving three sales taxes to fund the largest share of the project, about $1 billion. North Dakota has committed $570 million and Minnesota has been asked to provide $86 million. The federal government has dedicated $450 million and backers are hoping for another $300 million in federal grants.