By Alexandra Jaffe - 06/14/13 07:02 PM EDT
"I've gotta have folks with me who care as passionately about these things as I do. That's who Ed Markey is. I need Ed Markey in the United States Senate," he says in the ad.
Obama appeared in the state just two weeks out from Election Day as part of a take-no-chances strategy from Democrats concerned about a repeat of the 2010 surprise upset that sent Republican Scott Brown to the Senate.
Markey has led in nearly every poll of the race, but Republican Gabriel Gomez has managed to keep his lead down to single digits, prompting fears of a come-from-behind surge from the Republican.
Democrats hope Obama's endorsement will buoy Markey, as he's still widely popular in the state, and he defeated Republican Mitt Romney, Massachusetts's former governor, by 23 points in November.
Gomez has been heavily outspent on air by the Markey campaign, but an outside spending group that bills itself as moderate is going on air with a $700,000 buy for the Republican in the final weeks of the campaign.