The polarizing debate over the Keystone XL pipeline has created bitter tensions in Washington, in the media and within the environmental community. And now it’s created tensions in Silicon Valley.

On Friday, Elon Musk pulled out as a major donor to Mark Zuckerberg’s political group, FWD.us, after two subsidiaries of the organization paid for ads supporting the Keystone XL pipeline and oil drilling in the Arctic. The original purpose of the group was to push comprehensive immigration reform, not comment on energy policy. However, FWD's strategy has been to spend over a million dollars on ads promoting politicians who support immigration reform -- even though some of the ads have nothing to do with immigration.

That strategy apparently didn't sit well with Musk, who founded Tesla Motors and sits on the board of SolarCity.

“I agreed to support FWD, because there is a genuine need to reform immigration. However, this should not be done at the expense of other important causes,” Elon Musk told the website AllThingsD. “I have spent a lot of time fighting far larger lobbying organizations in D.C. and believe that the right way to win on a cause is to argue the merits of that cause.”

Also joining Musk in departing FWD was David Sacks, the founder of Yammer and former Chief Operating Officer of PayPal.

FWD still includes a number of heavy-hitters in Silicon Valley, including Bill Gates, venture capitalist John Doerr, Yahoo's Marissa Mayer and LinkedIn’s Reid Hoffman.

For an organization attempting to foster bipartisan support in Washington, the ads backed by FWD's funds are fairly political. In one ad supporting Senator Lindsay Graham (R-SC), the narrator slams President Obama's "seedy Chicago-style politics" and mocks his campaign's "change" slogan. Another ad promoting Senator Marco Rubio (R-FL) reassures the viewer that Obamacare will not apply to any immigration package.

But the two television ads supporting fossil fuel development are what sparked the most controversy among environmental groups and liberal activist organizations. Keystone XL, a proposed 1,700-mile pipeline that would carry tar sands crude from Canada to the Gulf Coast, has become a central target for environmentalists trying to raise awareness about climate change.

After the ads ran, advocacy organizations such as 350.org, CREDO, MoveOn.org, the League of Conservation Voters and the Sierra Club said they would pull advertising from Facebook.

The departure of Musk and Sacks illustrates how far the politics of Keystone XL have seeped outside of Washington.

Tom Steyer, the California billionaire hedge fund manager and clean energy activist, recently issued a political threat to a Democratic Senate candidate in Massachusetts for his support of Keystone XL. And just last week, 150 political donors to the Obama administration threatened to pull funding if the president approves the Keystone XL pipeline. Clean energy investor Vinod Khosla joined the group of donors, saying the pipeline is a "lousy investment."