President Obama exhorted a crowd of thousands to support US Senate hopeful Edward J. Markey, who Obama said, would "carry on the legacy of John Kerry and Ted Kennedy" and "be my partner."
At the Reggie Lewis Track and Athletic Center in Roxbury, Obama told a fired-up crowd that he needed Markey to help accomplish his agenda.
"I've got to have folks in the United States Senate who are willing to stand up for working people just like I am," he said to cheers and applause. "I need Ed Markey in the United States Senate!"
Obama reminded the audience to achieve that result, he needed them to head to the polls on June 25 and encourage their friends, family, and neighbors to do the same.
"You can't just think, 'I've done my work in 2012,'" Obama said. "You've got some work to do in 2013."
The president praised Markey's position on gun control, veterans' issues, climate change, Obama's health care law, "women's health," and other issues.
"He's been strong and he's been principled and that's the kind of leader we need right now" in the Senate, Obama said.
"What's holding us back right now is inaction in Washington," Obama said, criticizing the intransigence of some Republicans. "We've got to have some Democrats like Ed Markey who will stand up and do the right thing. That's what we need."
The crowd in the athletic center, which numbered in the thousands, cheered loudly for the president throughout his speech.
At one point during Obama's speech there appeared to be protesters yelling in the crowd, but they were drowned out by cheers of "O-bam-a! O-bam-a!"
Markey, a US Representative from Malden, introduced the president, lauding him as "an extraordinary leader for our country" and praising his accomplishments, in particular the Affordable Care Act.
He joked that the president, a longtime Chicago resident, had the hardest job in the United States. "The man that I am going to introduce is a Chicago Blackhawks fan and his job will be to present the Stanley Cup to the Boston Bruins," Markey said to cheers.
At the beginning of his remarks, Obama gamely knocked back.
"I am not going to talk trash about the hockey game," he said. "I'm not going to say anything about the outstanding qualities of the Chicago Blackhawks," Obama said to scattered boos.
The two teams face off tonight in the first game of the Stanley Cup Final.
Mayor Thomas M. Menino, cheered by a supportive crowd, spoke before Markey and Obama.
Moving to the podium on crutches, the mayor said Markey was the right choice for Boston.
"If you believe that government should be in the business of helping people," the mayor said, "if you believe that Elizabeth Warren deserves a strong partner in the Senate, then you need to vote for Ed Markey on June 25."
Obama's visit comes less than two weeks before voters cast their ballots to fill the seat held by Kerry, who resigned early this year to become secretary of state.
Markey, sweat beaded on his forehead, worked the crowd after the President had left the arena, posing for cell phone photos with excited supporters.
The rally marked something of a pivot point for the campaign as it ramps up its get out the vote effort, Markey told the Globe in a short interview.
"What the president does is he comes in as the guy that frames the final 13 days, so everyone's energy ratchets up to another level," Markey said.
Two polls released this week found Markey leading Gomez by 7 percentage points. One of those polls, from Suffolk University, found the president remains popular in the state. Sixty percent of those surveyed had a favorable opinion of Obama, while only 35 percent had an unfavorable opinion of him.
Obama was greeted at Logan Airport this morning by Governor Deval Patrick, Menino and Markey.
Before making his way to the gymnasium, Obama stopped with the three other elected officials in a South End eatery, Charlie's Sandwich Shoppe.
The president shook hands and hugged several diners, and took time to encourage them to vote in the special Senate election.
"I know it seems like there's an election every other week," Obama said.
"Do you know Ed Markey?" he asked one woman, before encouraging her to vote for Markey.
The President also attended a short fund-raising event for Markey before the rally. The Markey campaign did not disclose how much money the event brought in, but a Markey fund-raiser headlined by Michelle Obama two weeks ago brought in more than $700,000 for the campaign.
Before Obama spoke at the afternoon rally today, a number of local elected officials took the stage. Among them were Suffolk County Sheriff Steven W. Tompkins, state Senator Sonia Chang-Diaz and Ayanna Pressley, a councilor-at-large on the Boston City Council.
While Obama was rallying the crowd in Roxbury, Gomez held an event with veterans in Chelsea.
Markey and Gomez faced off Tuesday night in a debate in Springfield. During much of the hour-long forum, Gomez worked to dissociate himself from the national Republican Party.
After the debate, talking to reporters Gomez said he was "honored" Obama was making the trip to Boston.
"I'm honored that he's coming here because of me," Gomez said. "And I feel that, obviously, congressman Markey is running scared and bringing in the rest of his D.C. team."
Later Tuesday evening, Markey pushed back.
"Mr. Gomez brought in John McCain," the congressman said, referring to the US senator from Arizona, who was the 2008 GOP presidential nominee. "Mr. Gomez brought in Rudy Giuliani," Markey added, referring to the former mayor of New York City, a Republican.
"He shares their values. So, President Obama is coming in for me. I share his values," Markey said.