MARBURG, Germany — This fairy-tale town is stuck in the middle of a utopian struggle over renewable energy. The town council’s decision to require solar-heating panels has thrown Marburg into a vehement debate over the boundaries of ecological good citizenship and led opponents to charge that their genteel town has turned into a “green dictatorship.”

The town council took the significant step in June of moving from merely encouraging citizens to install solar panels to making them an obligation. The ordinance, the first of its kind in Germany, will require solar panels not only on new buildings, which fewer people oppose, but also on existing homes that undergo renovations or get new heating systems or roof repairs.

To give the regulation teeth, a fine of 1,000 euros, about $1,500, awaits those who do not comply.

Critics howled that the rule, which is to go into effect on Oct. 1, constituted an attack on the rights of property owners. The regional government in Giessen stepped in and warned that it would overturn the rule.

City officials in Marburg said, in turn, that they would take their case either to administrative court or all the way to the Hessian state capital, where they would try to get the state building code changed to protect their ordinance from officials in Giessen.