The Democratic primary for the open Senate seat in Massachusetts has become a new front in the national battle over the Keystone XL pipeline, with California billionaire Thomas Steyer threatening to spend heavily to influence its outcome.

On Monday, Steyer, who has spent more than $37 million of his own fortune in the past few years on California ballot initiative fights, joined with four young Massachusetts activists to pressure Rep. Steve Lynch (D-Mass.) to shift his position on the pipeline. Lynch has voted to pressure President Obama to grant TransCanada a permit to construct the pipeline; his rival in the April 30 primary, Rep. Edward J. Markey, opposes the project and has championed climate legislation.

In a letter to Lynch, Steyer and four Massachusetts environmentalists -- a recent law school graduate, two college students and a high school student -- asked the congressman “to do one of two things by high noon on Friday, March 22. Either act like a real Democrat and oppose Keystone’s dirty energy. Or, get a sworn, binding statement -- with securities law enforcement -- from TransCanada and the refiners that all of the Keystone-shipped oil will stay here.”

“If you can’t or won’t do either, then you’ll be showing us that you stand with Republicans and a wealthy foreign oil company and against solving the climate crisis," the letter reads.

The group warns that if Lynch does not comply, it will “launch an aggressive public education campaign” that will include investigative reports, public events and a college get-out-the-vote campaign.

When asked how much Steyer plans to spend on the race, his spokesman Chris Lehane declined to name a figure. Steyer spent more than $32 million during the last election cycle to pass a California ballot initiative that closed a $1 billion corporate tax loophole and diverted the money to energy-efficiency and education efforts for the next five years; during the 2010 election cycle, he spent $5 million to defend the state’s climate law.

“Tom’s record is pretty clear that he plays to win, as people can certainly learn from the campaigns he has run in the past,” Lehane said.

Two other environmental groups have weighed in on the battle between Lynch and Markey, who are vying to succeed Secretary of State John F. Kerry in the Senate. Last week, the League of Conservation Voters said it would spend at least $650,000 on a field campaign to rally support for Markey. And 350 Action, the political arm of the grass-roots environmental group, made its first endorsement of a political candidate by backing Markey.

Lynch campaign spokesman Conor Yunits said the congressman did not intend to change his stance in light of the climate activists' appeal.

"It's like something out of a James Bond film: a billionaire giving an ultimatum," he said. "The congressman, like President Obama, supports an 'all of the above' approach to energy policy, and he's not going to be swayed in his position by ultimatums and threats."