Did billionaire Tom Steyer's spending on the Massachusetts Senate Democratic primary influence the final outcome Tuesday night?

That question is hard to answer, even though the candidate he backed -- Rep. Edward J. Markey (D-Mass.) -- ended up defeating Rep. Stephen F. Lynch in the race to succeed Sen. Mo Cowan (D).

Steyer, a climate change activist who is lobbying President Obama to deny a permit for the construction of the Keystone XL pipeline, sought to turn Lynch's support for Keystone XL into a key issue in the primary. Lynch voted in the past to pressure Obama to grant TransCanada a permit to construct the pipeline, though by the end of the campaign he said he would wait until the State Department completed its environmental review of the proposal before taking a final position.

Markey, who opposes the pipeline, asked Steyer to stay out of the race. In an e-mail Tuesday night, Markey spokesman Andrew Zucker said the congressman's liberal record on guns, energy, abortion, entitlement and the economy won over primary voters rather than independent expenditures.

"Ed Markey's record of standing up to powerful interests like the gun lobby and Big Oil, protecting a woman's right to choose, defending Social Security and Medicare, and fighting for investments in Massachusetts jobs made Markey the clear choice in this election," Zucker said.

Steyer's NextGen political action committee spent $630,000 on a combination of grassroots organizing and public relations gimmicks, such as having a plane circle near Fenway Park the day the Red Sox played for the first time earlier this month, dragging a banner reading “Steve Lynch for Oil Evil Empire.”

They planned to spend another $500,000, according NextGen PAC spokesman Brian Mahar, but didn't because of the halt in campaigning in the wake of the Boston Marathon bombing.

Markey led Lynch for most of the race, though he widened his lead in recent weeks.

NextGen's most effective investment was likely the $250,000 it spent helping finance the League of Conservation Voters' voter mobilization efforts, adding to the nearly $600,000 LCV was already spending. In less than three months, LCV knocked on more than 250,000 doors and made more than 180,000 phone calls to voters before Tuesday's primary.

"We were very pleased to partner with Tom in a grassroots program to help a real climate champion win his race overwhelmingly," LCV president Gene Karpinski wrote in an e-mail.

Other liberal groups rallied to Markey's side, including Planned Parenthood Action Fund. And just as important, the AFL-CIO decided not to deploy its troops on behalf of Lynch, a strong labor ally.

But Craig Altemose, one of the young Massachusetts climate activists who invited Steyer to get involved in the race, said NextGen played a critical role in shaping the contest's political discourse.

"Despite halting our marketing and media efforts after the marathon, our polling and focus groups showed that we succeeded in elevating climate and the Keystone pipeline as prominent issues for our political leaders to address," he said in a statement. "For example, our outreach efforts reached 600,000 faith voters before and after the marathon and resulted in 70,000 Christian voters taking action on climate. I'm confident that more electoral engagement on these issues will be crucial to winning a safe and livable climate for all."

Taking "an action," according to Mahar, means either "signing a petition urging political leaders to oppose Keystone, taking a survey listing climate change as their top election priority, or going to an online resource center so they could be more informed on Election Day."

While the two candidates did debate Keystone XL before the bombings occurred, other issues such as homeland security took center stage in the attack's aftermath.

Lynch spokesman Conor Yunits ridiculed the assertion that Steyer's spending affected the primary results, even though his candidate ultimately lost.

"Tom Steyer's airplane helped raise Steve Lynch's name recognition," Yunits said. "Other than that he had no impact on this race."