Plans for what was once billed as one of the world’s largest solar power projects will be scaled back dramatically following years of opposition from three environmental groups who filed lawsuits over an endangered rat and other species they said would be harmed by its construction.

The settlement announced Friday over the Panoche Valley solar project in the remote ranchlands of San Benito County, about 25 miles south of Hollister, highlights the difficulty of building large renewable-energy projects in California.

The compromise was hailed by its developer, New York-based Con Edison Development, as well as the Sierra Club, the Santa Clara Valley Audubon Society and Defenders of Wildlife as a “win-win” for renewable energy and wildlife.

“As we work toward lowering carbon pollution, it’s critical that new clean energy development is not done at the expense of endangered animals and their habitat,” said Sarah Friedman, a senior representative for the Sierra Club’s Beyond Coal Campaign in Los Angeles.

But San Benito County supervisors, who were not included in the settlement talks, are furious, saying they will lose out on millions of dollars in taxes that they were promised when they originally approved the larger project in 2010.

“I can barely speak because I’m so angry,” said Supervisor Anthony Botelho. “This would have generated much-needed revenue. All you have to do is drive down there and see the conditions of our roads. We have minimal amounts of public safety. This was going to be a big thing, but the rug was pulled out from under us. And it was all done in secret.”

The original project, first proposed by a company called Solargen in 2009, would have consisted of 1.2 million solar panels producing 399 megawatts of electricity — enough to power about 100,000 homes.

After San Benito County — with a population of only 58,000 — approved it, three environmental groups sued, saying the county had not adequately protected the endangered giant kangaroo rat, blunt-nosed leopard lizard and San Joaquin kit fox, along with bird species such as the tri-colored blackbird that live in the ranchlands.

Get top headlines in your inbox every afternoon.

Sign up for the free PM Report newsletter.

“The environmental groups should have been our allies,” Botelho said. “They are the ones pushing the state to reduce carbon emissions. I just don’t understand it.”

The project has changed ownership several times, and it was reduced in size several years ago to 247 megawatts.

Under the settlement, Con Edison, which took full ownership last year, will reduce it again and build a 130-megawatt plant in Panoche Valley — providing enough power for about 32,500 homes. The project is about one-third the size of the original plan.

The company said it intends to build another large solar project of between 100 and 117 megawatts roughly 500 miles away in Imperial County. That project, which the environmental groups said they will not oppose because it’s located in a less ecologically sensitive area, is proposed on privately owned agricultural land between the town of El Centro and the Mexican border.

As word of the settlement leaked out in recent weeks, San Benito County supervisors discussed it Tuesday and had harsh words for the environmentalists and Con Edison.

The county had been counting originally on $5.4 million in sales tax from the large project — and then roughly $2.5 million under the 247-megawatt project. But Joe Paul Gonzalez, the county’s clerk-auditor-recorder, told supervisors that the county would not be receiving any sales tax from the project because Con Edison had purchased the panels in a way that made San Francisco the recipient rather than San Benito County.

County officials also told the supervisors that they would be receiving less property tax revenue with the smaller project.

At the meeting, Botelho called Con Edison officials “a bunch of crooks,” and fellow Supervisor Jerry Meunzer said “they basically raped and pillaged us.”

The supervisors voted to direct their staff and attorneys to study filing a lawsuit against Con Edison, on the grounds that the company violated the project’s original 2010 development agreement with the county.

The supervisors also had harsh words for the administration of Gov. Jerry Brown. The state Department of Fish and Wildlife was a party to the settlement agreement.

In an interview Friday, Jim Dixon, senior vice president and chief operating officer with Con Edison Clean Energy Businesses, said his company signed the agreement because even though the environmental groups had lost multiple lawsuits over the project, they still had cases they could appeal that could have slowed or killed it.

“We think the settlement assures that San Benito County will have a benefit from this project,” he said. “We were concerned there were issues that could derail the project and cause zero benefit to San Benito County.”

Another group not happy about the settlement is one of the project’s previous developers, Menlo Park-based PV2 Energy, which owned it from 2011 to 2015.

“This is very troubling to the people of San Benito County and to PV2 Energy,” said John Pimentel, the company’s president. “By diverting half of the project’s value to a different project outside the county, Con Edison is clearly violating their commitments to the county and to PV2 Energy.”

PV2 has sued Con Edison already, claiming that Con Edison has not paid PV2 revenues it says it’s contractually entitled to receive as part of Con Edision’s takeover of the project, including $20 million PV2 spent on studies, permits and options on more than 24,000 acres of land for wildlife around the roughly 1,300-acre footprint of the solar farm.

Construction began on the project last fall. Dixon said it is scheduled to begin producing power by 2018.

As for the sales tax issue with San Benito County, he said the issue is not settled.

“We’re looking into that,” Dixon said. “We understand we have obligations under the development agreement. We’re going to live up to them.”