LOS ANGELES -- On a tree-lined corner of Studio City filled with modest homes, flower gardens and neighbors who chat across back fences, two wiry celebrities are engaged in a green grudge match.

The good-natured competition between actor Ed Begley Jr. and Bill Nye, the host of the educational series Bill Nye, the Science Guy began when Nye moved into the neighborhood two years ago. Since then the two moderately famous and slightly geeky environmentalists have matched wits over whose home can leave a smaller carbon footprint.

Neighbor Frema Rood, 83, who lives between the two houses, said the competition started the day after Bill moved into the neighborhood.

"Bill announced it: 'I'm going to best Ed Begley at his own game. I'm going to get him,'" she recalled. "He ordered panels for the garage, then rain barrels, then he had his windows done and he put in a vegetable garden."

Nye, 52, pins the source of the rivalry on Begley, who became envious of Nye's new solar panels while filming a segment of his HGTV green living show called Living with Ed.

"Ed instantly got a little twinge — you could see it," Nye said. "My system, being 15 years younger, has a couple of nice little features that he doesn't have."

To liven up the segment, the neighbors pretended to spar over who had the better system. But in this city where the rich and famous jockey to be the first behind the wheel of a new alternative-fuel car, the jokes have given way to an environmental turf war.

Nye trumped Begley's old solar panels with a system that shows when he's making more power than he's using. Begley pushed to offset his wife's 20-minute showers with rain barrels to water the plants.

Begley long ago installed an Astro Turf lawn to save on water. He composts his garbage, cooks in an outdoor solar oven and grows his own produce. His sprinkler system electronically checks the forecast and shuts down if it's supposed to rain.

Instead of using pesticides, Begley lures slugs and snails away from his plants with trays of beer that kill them. Nye, who also has plots overflowing with produce, keeps raccoons away with an electric fence powered by a matchbox-sized solar panel.

The white picket fence that surrounds Begley's two bedroom, 1,585 square foot bungalow is made of recycled plastic milk cartons pressed into boards. Nye used the recycled plastic lumber to build a patio cover, and convinced Rood to use the same type of boards to repair their shared white fence.

While Begley calls the rivalry a "a friendly, humorous one-upmanship," he admits there are parts of the competition that are quite serious.

"He has these great copper rain gutters that I covet," Begley said.

Given Begley's 20-year head start, Nye admits that he may never fully catch up to his neighbor, who was green long before it was considered cool. Nye has called Begley the inspiration behind many of the changes he's made, including illuminating his American flag at night with a light bulb powered by a tiny solar panel.

Begley's daughter, Amanda, still remembers the days when her friends thought her father was a nut. His early electric car would start puttering out of energy as it climbed hills, and he would ask his daughter's friends — self-conscious teenage girls — how much they weighed.

"Now it's different," said Amanda Begley, now 30. "He went from being the kookiest guy around to the cool guy that everyone's calling and asking questions about things instead of just thinking, you know, that he was out of his mind."

These days Begley has his own all-purpose biodegradable cleaner called "Begley's Best" and is regularly approached by inventors to test new products.

Nye remains confidently in the lead in terms of aesthetics and order. Begley has wires poking out of appliances, bricks piled high and red rain barrels are an eyesore against the actor's blue home, Nye said.

"Ed claims — and this is an extraordinary claim — that he doesn't care how things look as long as they function well," Nye said. "I'm not in that camp. Things have to look good or don't bother."

Begley said his wife is not a fan of the barrels either. He admitted the barrels were unattractive but claims he didn't know they came in different colors and styles.

Begley has since settled on a new plan that should be acceptable to his wife — an underground cistern to store the water. More importantly, does he think his latest innovation will make Nye jealous?

"He already is," Begley said.