What to do? Paint the utility green, naturally. Goldman advised its clients to strike a massive compromise with environmentalists: First, nix plans for all but three of 11 coal-fired plants TXU intended to build. And invest $400 million in energy-saving initiatives, like wind power. It won a green thumbs up from environmentalists, who applauded the role of Wall Street’s top M&A firm. “Goldman’s willingness to make the environment a key component of the deal” helped broker a truce, says Fred Krupp, president of the advocacy group Environmental Defense. With the air cleared, TXU’s board last week accepted KKR and Texas Pacific’s record $45 billion leveraged-buyout offer.

Wall Street is experiencing a climate change. Elite global investment banks like Citi, J.P. Morgan and Merrill Lynch never used to think twice about filling up the tanks of the nation’s biggest polluters looking for cash. But now, many of the same banks that grew rich financing companies’ strip mines, oil rigs and SUV plants are advising clients that the way to get the green is to go green. Since the late 1990s, environmentalists have been pressuring bankers to clean up their act, and to make it their business to persuade clients to do the same. “Sometimes we will decline to do a piece of business,” says Mark Tercek, Goldman’s green czar. “But more frequently, we recommend how we’d like to see the transaction proceed. Usually the client is open to our advice.” In an age when Al Gore wins an Oscar for a film on global warming, no one wants to look like they’re beating up on Mother Nature.

It looks as though Goldman Sachs is leading the greening of Wall Street. It all started in 2004, when the firm acquired a loan that was secured by 680,000 acres of land in southern Chile near Antarctica, on Tierra del Fuego. Goldman decided to set the land aside as a nature preserve, in collaboration with the Wildlife Conservation Society. “That was the [environmental] epiphany,” says Tercek. Since then, Goldman has been on a green jag. In late 2005 it established a formal policy that, among other things, bars the firm from bankrolling projects that “significantly convert or degrade a critical natural habitat.” Goldman committed to avoiding business with illegal loggers, and the firm has pledged a 7 percent cut in indirect greenhouse-gas emissions from its offices. Goldman is also fast becoming a developer of renewable energy, following its 2005 purchase of Horizon Wind Energy.

The rest of Wall Street is turning over a new leaf, too. Several major firms have formal green policies. Last week, Lehman Brothers established an internal Global Council on Climate Change, naming as its head none other than Theodore Roosevelt IV, great-grandson of the most formidable environmental president. Firms are cranking out research reports with names like “Climatic Consequences,” a 120-page tome from Citi. “We started paying attention back in 2001, long before any other financial institution in the U.S.,” says Pamela Flaherty, head of Citi’s global community relations. Is that the sound of greenish envy?

True, some of these attempts are, well, pale green at best, but environmentalists are heartened. The investment banks are “very welcome players in what is as much an economic as a science and environmental discussion,” says Mindy Lubber, president of Ceres, a network of investors, environmental groups and public-interest advocates that enlists capital markets in the environmental fight. For its part, Goldman says its environmental focus is pivotal to creating “long-term value for our shareholders and serving the best interest of our clients.” Or, as Gordon Gekko might say, “Green is good.”