In a time when it pays to be environmentally friendly, Larry Walth is learning the hard way that it isn't easy being green.

Walth, of Wishek, N.D., pop. 1,100, is readying for a legal battle over the 39-foot wind turbine he built in his backyard.

In April, he was denied a permit to put up the wind turbine because it does not meet zoning codes for residential districts. But, in defiance of city officials, he put it up two months later anyway. And now he intends to keep it standing on his two-lot property on the edge of town.

Walth believes he is on firm legal ground since he put up the structure five months before city officials passed a new city zoning ordinance last month banning wind turbines in all non-commercial districts. Walth believes he is exempt from the the ordinance, because it would have to be applied retroactively to his turbine.

"I'm not taking it down, I don't care what they have to go through," Walth, 68, told FoxNews.com. "What harm does it do? It's actually good for the environment."

He said he was fined $50, roughly what he estimates the 2.6-kilowatt turbine saves him each month, after he put up the $10,000 turbine without permit. But the fine could increase to $500 per day if he disregards the city's order to remove it.

Wishek City Attorney Richard Herr said he has recommended that the city pursue a court order for Walth to the remove the turbine. As of late Tuesday, Herr said the city has decided to forgo levying heavy fines.

"That's up to our discretion to seek that," Herr said. "For now, we're not going to bother with that. We're going to seek a court order to take it down."

Walth's turbine is in violation of a previous zoning ordinance in 2002, Herr said, debunking any potential use of a grandfather clause.

Herr said a similar case a few years ago culminated with the structure in question being removed after a nearly two-year legal fight. He doesn't anticipate such a battle this time, he said.

"[Walth] shouldn't have put it up," he said. "He didn't have a permit and it's not allowed in residential districts anyway. That's our interpretation."

Herr said city officials have received several complaints about the turbine, but Walth says that isn't so.

"People in this town can't figure out why they're spending all this time to tear it down," he said. "It's on my property. I don't care what they do, even if they get signatures from everyone in town."

Walth, who is still hoping to receive a 30 percent energy tax credit for the turbine, said he had no idea that an environmentally friendly project would lead to such trouble.

"Something so innocent as a turbine, something that's actually good for the environment and produces renewable energy, what's wrong with it?" he said. "And now the government wants to tear it down. What's up with that [expletive]?"

Jason Hastings, Walth's attorney, said he and Herr are "discussing options" to avoid court action.

Walth, meanwhile, said he isn't planning to shut down the turbine anytime soon.

"It's energy and it's not coming from coal, which is not clean," he said. "I've got grandchildren and I'm concerned about their future and our environment. There's plenty of space for this."