After a two-year legal battle to stay open, an oyster farm at Point Reyes National Seashore announced Monday it has settled its case and will close all of its operations by Dec. 31.

The Drakes Bay Oyster Co. had sued the U.S. Interior Department in federal court to challenge a 2012 decision by then-Interior Secretary Ken Salazar to allow its lease at an estuary of Drakes Bay to expire.

The company lost its bid for a preliminary injunction from a federal trial judge in Oakland and before the 9th U.S. Circuit Court of Appeals in San Francisco. The last legal step in the case came in June, when the U.S. Supreme Court declined to hear its appeal.

The oyster farm closed its retail and canning operations on July 31, but continued wholesale sales while negotiating with the National Park Service about the terms of a full closure.

Under the settlement, announced by both the oyster company and the National Park Service Monday, Drakes Bay can continue the harvesting and wholesale sales of oysters until Dec. 31.

The park service will take responsibility for the complex removal of onshore facilities and underwater oyster-farming structures spread over 1,000 acres of the estuary and will also provide federal relocation assistance to company employees.

Oyster farm co-owners Kevin, Joe and Bob Lunny said in a statement, "We fought long and hard all the way to the U.S. Supreme Court. Along the way we stood up for family farms, for sustainable food, and for scientific integrity in government."

"Even though we believe we were right, as good and law-abiding Americans, we accept this decision and will now move on to other things," the owners said. The Lunnys said they plan to open a oyster restaurant in Inverness.

Christine Lehnertz, the Pacific West Regional Director of the National Park Service, said, "We are pleased to have reached this settlement." Lerhnertz said that more than 2.5 million people visit the national seashore each year and that Drakes Estero is slated to become part of the only marine wilderness on the West Coast outside of Alaska.

"We will continue to take our stewardship responsibilities seriously on behalf of the American people," Lehnertz said.

Amy Trainer, the executive director of the Environmental Action Committee of West Marin, called the settlement "a very generous deal for the oyster company."

"We are glad that Drakes Estero, a magnificent ecological treasure, is finally on its way to be restored to its wild, natural rhythm, free of non-native and invasive species," Trainer said.

The settlement must be approved by U.S. District Judge Yvonne Gonzalez Rogers of Oakland.