BOSTON (AP) — A California billionaire who supports environmental causes vowed to target Massachusetts U.S. Rep. Stephen Lynch in the state's U.S. Senate race unless Lynch promises to oppose the Keystone XL Pipeline project.

Thomas Steyer's warning in a letter to the Democratic candidate on Monday was quickly dismissed by the Lynch campaign as "threats and ultimatums" that sounded like they came straight from a "James Bond film."

Lynch voted last April to support a transportation bill in the House that included language calling on the federal government to approve a permit for the $7 billion pipeline, which would carry oil from western Canada through several mid-Western states to refineries along the Texas Gulf Coast.

Environmental groups have been pressuring the Obama administration to reject the pipeline, saying it would carry "dirty oil" that contributes to global warming.

U.S. Rep. Edward Markey, Lynch's Democratic opponent in the April 30 primary race for John Kerry's former Senate seat, opposes the pipeline and voted against the bill last spring. Three Republicans are running for their party's nomination. The special election is June 25.

Steyer, who founded the investment firm Farallon Capital Management and is a self-described "clean energy philanthropist," wrote to Lynch at the behest of four environmental activists in Massachusetts, who also signed the letter and released copies Monday.

Calling Keystone "the defining climate change issue of today," the letter said the pipeline would increase pollution that contributes to climate change and hurt the U.S. economy. It also questioned assertions by supporters that the pipeline would create thousands of jobs and noted that TransCanada, the company backing Keystone, had not committed to keeping the oil in the U.S.

"Saying you're for solving climate change while supporting Keystone is like claiming to be a Red Sox fan — except when they play the Yankees," the letter to the South Boston congressman stated.

The letter asked Lynch to do one of two things by "high noon" on Friday: Either publicly denounce the pipeline or get sworn statements from TransCanada and U.S. refineries that the oil would not be shipped overseas.

Failure by Lynch to do so would result in the launching of what the letter called "an aggressive public education campaign," against him and his stance on climate change issues.

Conor Yunits, a spokesman for Lynch, said the campaign would not bow to pressure.

"This letter reads like something out of a James Bond film — a billionaire making threats and issuing ultimatums that expire at 'high noon,'" Yunits said in a statement.

"Like President Obama, Congressman Lynch supports an all-of-the-above energy strategy, and he is not going to respond to threats and ultimatums — especially from someone whose company has made millions off of investments in oil."

Steyer, a longtime Democratic donor who left Farallon last year, has previously said his company invested both in oil companies, alternative energy, and clean technology companies.

He donated $2.5 million to help defeat a ballot initiative in 2010 that would have postponed implementation of a California law requiring a statewide reduction in greenhouse gas emissions.

The White House said last week that Obama had not yet made a decision on Keystone. Kerry, a Democrat who resigned from the Senate to become Secretary of State, also said during his confirmation hearing that he had not made a final judgment on the pipeline — which would fall under State Department jurisdiction because it crosses an international border.

Lynch and Markey have signed a pledge to keep advertising by outside groups out of the campaign, but groups can spend money in other ways to back candidates. The League of Conservation Voters, a national environmental advocacy group, said recently it would spend $650,000 on a grassroots effort to help elect Markey.

Craig Altemose of Somerville, one of the Massachusetts activists who signed the letter to Lynch, did not say how much the group planned to spend but said it would honor the no-advertising agreement.

Three Republicans are seeking their party's nomination for the U.S. Senate seat. The special election is June 25.