When it comes to environmentally friendly cities, there’s no place much greener or more granola than Boulder, Colo. The city of 97,000 on the edge of the Rocky Mountains has long been a leader in things like recycling programs and open-space preservation. It’s home to the University of Colorado, a nationally renowned leader in sustainability research, and in 2002, the Boulder City Council officially adopted the Kyoto Protocol. By the city’s own count, Boulder has shown up on nearly a dozen “greenest city” lists in the past decade. Last year, officials committed to building 40 electric vehicle charging stations around town. Boulder even uses grazing goats as weed control on some municipal properties.

So it’s no big surprise that Boulder wants its energy sources to be green, too. But that’s lately forced the city to ask some fundamental questions: Can local sustainability initiatives coexist with for-profit utilities that are operating out of financial self-interest? Or is there an inevitable impasse between green-government goals and utility companies that remain committed to their bottom line? Simply put, if cities want to go green, must they go it alone?

Boulder recently answered that last question with a resounding yes. After six years of deliberation, Boulder is taking steps toward “municipalization,” breaking away from Xcel Energy, its utilities provider, and assuming full control of its own electricity system. It’s a risky plan filled with challenges, but advocates insist it’s a necessary move if Boulder wants to dictate the terms of its shift to greater energy efficiency. “Municipalization is one of the paths that allow us to achieve our long-term objectives,” says Jonathan Koehn, the city’s sustainability officer. “We want to be able to have more choices about how we get our electricity. It gives the community a greater say about its long-term energy needs.”

Boulder isn’t alone in the push for greater autonomy from utility providers. A growing number of cities and counties are exploring new aggregation pacts that would allow them to pool together to buy energy from alternative sources. And Huntington Beach, Calif., for example, recently tried to install more efficient LED streetlights, only to face higher rates from its utility. The city responded by taking more control of streetlight installation and maintenance.

Whether they’re providing more options or, like Boulder, completely decoupling from their energy providers, more places are confronting what they say is an inherent conflict between reduced energy consumption and private utility companies dependent on selling as much energy as they can.

Minneapolis-based Xcel Energy is one of the largest energy companies in the country. In 2000, Xcel purchased New Century Energies, whose predecessor had provided Boulder’s electricity for more than 80 years. The company’s latest 20-year franchise agreement with Boulder was set to expire in 2010. With that expiration date on the horizon, the city in 2005 began exploring alternative ways to purchase its power. When Xcel added Boulder to its smart-grid demonstration project in 2008, the idea was put on hold. But in 2010, as contract negotiations for a new franchise agreement stalled, the city once again started considering its options, including municipalization.

In many respects, Xcel should have been a good partner for a city looking to green its energy consumption. Xcel was already one of the greenest energy companies in the U.S. -- just two months ago, one independent analysis ranked Xcel among the nation’s top three most sustainable utility companies, based on the use of renewable sources like wind, solar and hydropower. Once negotiations started heating up with Boulder, Xcel offered to build the city a wind farm and pledged that 90 percent of Boulder’s energy would come from renewable sources by 2020. (Currently, about 10 to 15 percent of the city’s power comes from renewables.) If city officials would drop their municipalization plan, Xcel promised to make Boulder the “most green city worldwide” by the end of the decade.

But Boulder officials weren’t interested. “I can’t tell you what happened,” says Jerome Davis, Xcel’s regional vice president for Colorado. “Your guess is as good as mine. There was a faction in Boulder, and I think all they ever wanted was municipalization.”

Part of the city’s reasoning was fiscal. City projections showed that Xcel rates would increase by 30 percent over the next decade. Municipalization, according to an initial cost analysis, should save money. The average utility rate would fall by 10 percent for commercial customers and 7 percent for residential and industrial customers over the next decade. Based on that cost model, developed by an energy consulting firm for the city, Boulder could save more than $110 million over the next 10 years. Combined with the perceived environmental benefits of being able to source their own energy, city officials were sold. “We want to have an independent voice for our fuel sources,” says Councilwoman Lisa Morzel, who supported the move toward municipalization. “What we need is a democratized, decarbonized energy future.”

Boulder placed two questions on the November 2011 ballot: The first asked permission to break from Xcel and create a publicly owned electric utility, as long as the rates wouldn’t exceed Xcel’s at the time of the takeover. The second requested a utility tax increase to fund the administrative and legal costs of municipalization. The campaign became the most expensive in Boulder history; more than $1 million was spent in the months leading up to the election. The vast majority -- $967,000 -- was spent by municipalization opponents, mostly bankrolled by Xcel. Despite the spending blitz, both initiatives passed, although only by slim margins. Now the city has $1.9 million and five years to develop a municipalized utility that will be cost-effective for the city and its residents.

Boulder’s move isn’t unprecedented: According to the American Public Power Association, more than 2,000 cities and towns operate a publicly owned electric utility. But many of those date back nearly a century -- half are more than 90 years old. And 70 percent of them serve populations of 10,000 or fewer.

Boulder and Xcel likely will have to litigate the city’s purchase of the company’s equipment -- the power lines, transformers and so on -- in state court. Initial estimates have priced that system at more than $83 million. The parties will also go before the Federal Energy Regulatory Commission to determine what stranded costs (based on investments that Xcel made while expecting continued revenue from Boulder) the city might owe the company. “We don’t want to sell the system,” Davis says, “so we’re going to get what’s owed us.” The city will have to issue bonds to pay for that process. Even with that added debt, however, the city still believes municipalization should lead to lower rates.

After the initial costs and transitions are worked out, there’s still the small matter of Boulder learning how to administer its own electric utility. City officials say they’re confident that, because the city already oversees its gas and water utilities, the addition of an electric utility would be smooth. And they’re bolstered by the idea of providing greener energy to residents at lower rates. “Boulder’s residents trust us to move forward, cautiously, of course,” Koehn says. “If we can come up with a new way to treat energy as a service, and do some things that protect all of our customers, then we can find a sweet spot between economic, social and environmental concerns.”

As in Boulder, the promise of lower costs and a smaller carbon footprint led Huntington Beach, a city of nearly 200,000 people just south of Los Angeles, to look at what energy-efficiency measures it could pursue. For Huntington Beach, the issue was streetlights. The city was spending $2 million a year -- out of a $4.4 million total energy budget -- on street lighting. Huntington Beach’s energy project manager, Aaron Klemm, says that was a natural opportunity for improvement. “I wouldn’t be doing my job if I didn’t try to figure out a way to try to spend less there.”

The answer? Switch to more efficient LED streetlights. The problem? Under the rate plan of the city’s energy provider, Southern California Edison (SCE), Huntington Beach would have to purchase the new lights and then give them to the utility company to install and maintain. What’s more, SCE charges 6 percent more for LED lights than for the less-efficient, high-pressure sodium lights currently in place. “You don’t see any savings,” says Klemm. “It costs you more to use less energy, which upends the whole process.”

Last December, Huntington Beach joined a coalition of six other communities challenging the company’s rate design before the California Public Utilities Commission. After many conversations, Huntington Beach and SCE reached preliminary agreement in March for the city to purchase the company’s street lighting equipment. They have yet to agree on a price, but the process is under way. Klemm has already found one point of contention: The company wants to uncap the overall price of the equipment but cap the depreciation assessment that would drive down the price. (SCE did not respond to requests to comment for this story.)

Controlling the equipment would let Huntington Beach upgrade the lights to use less energy, provide better illumination, require less maintenance and customize lighting based on different needs in different neighborhoods -- all of which lead to cost savings and better service, Klemm says. “These are some of the new options that are created once you own the streetlights.”

Five hundred miles up the Pacific coast, Sonoma County, Calif., is taking a middle-road approach between Huntington Beach’s targeted street-lighting effort and Boulder’s outright takeover. It’s called community choice aggregation (CCA), and it allows cities and counties to join a service area that collectively purchases energy, giving the governments greater control over costs and energy sources than they would have with a traditional utility. Individual customers can choose whether they want to get their power from the CCA or continue to receive electricity from the current power company, which in Sonoma’s case is Pacific Gas and Electric. Massachusetts in 1997 was the first state to allow local governments to form CCAs. Since then, California, Ohio, New Jersey and Rhode Island have also passed laws authorizing CCAs. Last October, Sonoma County received state approval to form one.

An independent report by a private consulting firm confirmed that a CCA is feasible for Sonoma. Customers would likely pay higher rates over a projected 20-year period, but the gap between the CCA rates and existing utility rates would narrow over that time. The real benefit, says Amy Bolten, spokeswoman for the county water agency, which would run the CCA, is that customers would have options. “This is about providing a choice to our residents to have dramatically greener power if they want to.”

As long as reduced energy consumption means smaller profits for power companies, more and more cities will likely be looking at options like CCAs and municipalization. But there could be another solution, says Cliff Majersik, executive director of the Institute for Market Transformation in Washington, D.C., a nonprofit research group that advocates for energy efficiency. He and other industry observers envision a rate structure that would benefit utility companies that meet sustainability goals. “We have to change the rules,” Majersik says. “If somebody is making a profit for doing the right thing, then they’re going to keep doing the right thing.”

Until such a shift occurs, localities will be deciding what route is best for them. In Boulder, that probably means municipalization. (City officials stress that other options, including a CCA model, remain on the table. But a public takeover is the working plan.) And despite the legal administrative headaches, Koehn believes Boulder is seizing a golden opportunity to take full control of its energy needs. There will be no shareholders to appease, he says, only the city and its constituents. “Where do we want to be in 20, 50, 100 years? That’s the planning horizon that we’re on,” he says. “Communities that are looking at efficient energy now are going to be well positioned to reap the benefits.”