After 66 years of litigation and more than 50 years of settlement talks, the longest-running federal civil case in San Diego has ended.

The Fallbrook Public Utility District board of directors voted unanimously Monday to end a water dispute with the U.S. government over rights to water that flows from the Santa Margarita River.

“After eight years of my time here, and many more years of other people’s time before that, we are at the point where we have a final agreement with Camp Pendleton on the Santa Margarita,” the district’s acting general manager, Jack Bebee, told directors.

In 1951, the government sued Fallbrook, claiming the water from the river that flows to the ocean through the Marine Corps base was the property of the United States. The courts agreed.

Fifteen years later, the ruling was modified on appeal, and Camp Pendleton and Fallbrook were told they needed to work together to come up with a physical way to share the water.

Those talks have been going on for the past 50 years.

For a while, in the 1980s, a plan was being devised to build a dam in Fallbrook to collect some of the river water, but that was near the end of the dam-building era in the country and environmental conflicts stopped consideration of the project.

Last month, the Department of Justice, at the request of the Department of the Navy, signed off on a comprehensive plan that will secure a steady flow of water from Camp Pendleton to the Fallbrook district.

The Santa Margarita River Conjunctive Use project calls for water to flow to the base, where it is stored in lakes that seep into an underground aquifer where it is stored.

Under the agreement, some of that water will now be pumped out of the ground and piped back to Fallbrook, thereby securing a local source of water for the district and reducing its costs of having to import water from Northern California.

The water will be sold to the district at prices far lower than what imported water costs and should save the district $1 million annually.

Johnston said the project has spanned two generations and he is pleased to be working with the community of Fallbrook, where many Marines live, go to church, coach softball teams and live side by side as residents of the community.

Johnston said he’s been all over the world and been part of three wars. “Water isn’t going to get any cheaper, it’s not going to get any easier to procure and there’s a lot more population still to come,” he said. “This is a huge and wonderful investment.”

The government is spending $47 million to build the pumping and piping infrastructure and Fallbrook plans to spend $45 million on its own facilities, which include a small groundwater treatment plant to reduce the level of salt in the water, a pump station and reservoir, and some piping.

Fallbrook’s cost will be funded by a low-interest, state revolving loan at 1.8 percent interest for 20 years and is expected to be completed by 2020.

The repayment of the loan and the operating costs are projected to be lower than the cost of buying the imported water the district currently purchases. Officials said it will help reduce the cost to customers and will save the district about 10 percent per year in water costs.

“In two years, we’re hoping to have our own, cost-effective water supply,” Bebee said.