Bill Hopping watched a work crew on Monday install solar panels on his Birmingham Township home, taking a small measure of satisfaction at the end of a year-long struggle with local authorities over renewable power.

The crew scrambled for footholds on the slick, pitched metal roof, not unlike the slippery slope that Hopping and his wife, Yolanda, embarked on in 2017 when the Chester County town's zoning board rejected their proposed system. It did not comply with rules prohibiting rooftop solar panels from being visible from the street.

"They kind of lifted a middle finger at me," said Hopping, 56. "That just made me a little more stubborn. I had to get to the bottom of this."

Hopping, a former corporate lawyer who now has a part-time private practice, sued the township, saying it could not constitutionally prohibit rooftop solar panels on purely aesthetic grounds. Both sides dug in for a long battle.

But last month the township conceded and let the Hoppings install their $60,000 rooftop solar system on their Radley Run house, facing the street.

"I think they were generally shocked and embarrassed they were sued," said Hopping, who said he was prepared to push the litigation further.

Hopping's case is not unusual, solar experts say. As the popularity of renewable power grows, homeowners eager to install solar systems are encountering a host of obstacles: cumbersome municipal permitting processes, inhospitable utilities, and homeowners associations firmly opposed to any exterior alterations.

"Some people don't like the look of solar systems, and they think it will change the character of a neighborhood," said Zachary Greene, a program director for the Solar Foundation in Washington, which aims to advance the adoption of solar energy. "You see this in historical areas where the architectural consistency is something they might want to maintain."

Birmingham Township, population 4,200, is clearly a place where appearances are important: It is manicured and affluent, and tends to vote Republican, except in the 2016 presidential race, where voters crossed over and supported Hillary Clinton.

It is also steeped in history. The main clash of Colonial and British forces in the pivotal 1777 Battle of Brandywine occurred across its rolling landscape.

But Birmingham's solar zoning ordinance makes no distinction between the historic district and newer developments such as Radley Run, where the Hoppings four years ago moved into a contemporary house built in 1987. The zoning ordinance simply prohibits all rooftop solar installations that are visible from the street.

Though more than 45,000 Pennsylvania homes have solar power — compared with 394,000  in New Jersey — very few are located in Birmingham Township.

Hopping argued that his house, which is partially shielded from the street by trees, was appropriate for solar. He replaced the shingle roof with a gray metal roof to better match the solar panels. "I'm hoping with the metal roof and the contemporary house, it won't look too out of place," he said.

As the popularity of residential solar power began to grow about a decade ago, some municipalities adopted rules to encourage renewable energy. But others enacted restrictions, sometimes in reaction to early installations that went awry, said Greene, who manages a program called SolSmart, which is funded by the U.S. Department of Energy to help local governments simplify the solar permitting process.

Indeed, there are plenty of online images showing ugly rooftop solar installations. Some municipalities require flush-mounted panels on pitched roofs, and forbid installments that are higher than the roofline.

Some solar skeptics say the glare from photovoltaic panels might be a nuisance. Planners dismiss the fears, saying that solar cells are designed to absorb light, not reflect it.

"We don't encourage municipalities to regulate for glare," said Elizabeth Compitello, manager of local initiatives for the Delaware Valley Regional Planning Commission. "It's a very difficult thing to regulate for, and costly if you require a glare study."

There is also sometimes an unspoken political undercurrent to the renewable energy issue — a partisan debate over climate change. One homeowner's patriotic effort to reduce greenhouse gases is another's state-subsidized eyesore.

"Beauty is in the eye of beholder," said Jon Lesher, an environmental planner and solar expert for the Montgomery County Planning Commission. "Some people see solar panels and say, `That's awesome, that's progressive.' Others might see it and say, `Wow, you've just slapped a piece of technology on our beautiful historic, quaint downtown.'"

The aesthetic issue may recede in the future as solar panel manufacturers improve early versions of photovoltaic systems that are designed to look like roofing materials. Tesla unveiled a line of solar roof shingles and tiles in 2016, but the systems are still expensive and inefficient compared with conventional solar panels.

"They don't make economic sense yet," said Lesher, who has advised about 30 Montgomery County towns on drafting solar-friendly regulations. "Hopefully, in the near future, the technology gears up."

Hopping said he was motivated to install his 42-panel solar system — he chose high-efficiency LG panels that boosted the project cost — partly out of concern for the environment but also a desire to increase his independence from the electric grid. He calls himself a progressive, nonpartisan libertarian.

"I'm not a nut about solar panels," he said. "Whatever you think about global warming or over-dependence on fossil fuels, it just makes financial sense." He expects that  the 15.1-kilowatt system, installed by Solar States LLC of Philadelphia, will pay for itself in eight years, generating 80 percent of his electricity needs.

Hopping said the 30 percent federal tax credit, which is scheduled to begin winding down in 2020, was also a strong incentive, although he acknowledged that some of his friends who call solar subsidies "idiotic tax policy" may have a point.

"Even if I'm philosophically opposed to using the tax law to effect social change doesn't mean I won't take advantage of them if they're there," he said. "It's all perfectly legal and transparent."

Hopping said he can only speculate about what motivated Birmingham Township to enact an ordinance in 2010 requiring a homeowner to file for a special zoning exception to install a rooftop solar system. "I could never get anybody to engage on this before we got in front of the judge," he said.

Hopping supplied statements from six neighbors who did not object, although two noted that his roof was visible from the street, General Sullivan Drive. He also submitted a legislative history on Birmingham's ordinance to the zoning hearing board, and compared Birmingham's zoning ordinances with those in other Chester County communities.

But the board declined to approve it, saying the proposed installation on the front roof, which faces south toward the sun, is also in full view of the street.

Hopping said his case did not gain traction until it went to a hearing this summer before Chester County Common Pleas Court Judge David F. Bortner. The judge, a former Birmingham Township supervisor, who also lives in Radley Run, offered to recuse himself, but Hopping and the township solicitor agreed to let him hear the case.

At a hearing, Bortner suggested to the township solicitor, Kristin S. Camp, that the township likely would lose if Hopping challenged the validity of the ordinance.

That initiated negotiations, leading to a Sept. 19 settlement in which the township agreed to let the Hoppings install their system in exchange for dropping the lawsuit.

The township "agreed that if he had filed a substantive challenge, he most likely would prevail," Camp said in an interview. "That was where we said, we're not going to make him go through all those hoops, we'll recognize when something's at fault here."

Camp said she would advise the town to get rid of the solar restrictions when it conducts a review of all its ordinances pertaining to alternative energy systems.

"I don't think you can't have something that is purely based on aesthetics," she said, though she believes the township could devise more rigid restrictions in Birmingham's historic district, which is protected under state laws.

As for Hopping, he is relieved the ordeal is over.

"I don't want them to feel like I'm doing an end-zone dance," he said. "I just want my solar panels in."