BOSTON â" President Obama drew a crowd of thousands to a campaign rally for Representative Edward J. Markey on Wednesday, an event that seemed intended to generate a push of energy two weeks before the end of a relatively sleepy campaign.
âI need Ed Markey in the United States Senate,â Mr. Obama said. âThis electionâs going to come down to turnout. Weâve got a whole lot of Democrats in this state and a whole lot of Obama folks. But you canât just turn out in a presidential election â" youâve got to turn out in this election.â
Mr. Markey, a Democrat, is running for the seat John Kerry left open when he became secretary of state. Mr. Markeyâs Republican opponent, Gabriel Gomez, is a businessman and former member of the Navy SEALs who is a political newcomer.
The rally was Mr. Obamaâs first trip to Boston since he attended a memorial service here in the days after the Boston Marathon bombings â" events that still loomed large over the rally. White House officials said that shortly before Mr. Obama made his speech, he met with the family of Sean Collier, the M.I.T. police officer who the authorities say was shot and killed by the bombing suspects, Tamerlan and Dzohokar Tsarnaev. Mr. Obama opened his remarks on Wednesday by recalling the âAmerican spiritâ he saw here after the bombing.
âThe problem we have is that spirit of generosity, and selfnessness, and community, we donât see that reflected enough in our politics in Washington,â said Mr. Obama, addressing a diverse crowd in the Reggie Lewis Track and Athletic Center at Roxbury Community College. âAnd thatâs why Iâm here today,â
Officials from the Markey campaign said that more than 5,000 people were inside, while 2,000 more waited outside.
Mr. Obama made scant mention of Mr. Gomez during his speech, which lasted a little less than 25 minutes. He sought to paint Mr. Markey as a fitting member of a group of prominent Democrats this state has sent to the Senate, invoking Edward M. Kennedy, Mr. Kerry and Elizabeth Warren.
âNobody is better suited to continue that legacy than Ed Markey, because Edâs one of you,â Mr. Obama said, drawing on Mr. Markeyâs working-class family background.
Mr. Obama pointed to Mr. Markeyâs support of gun control, womenâs rights and environmental protection during his 36-year Congressional career. âEd has a track record, and thatâs why you know what heâs going to do when heâs a senator for the Commonwealth of Massachusetts. Heâs not somebody who comes out of nowhere and says heâs for something and maybe heâs for something else,â Mr. Obama said, presumably alluding to Mr. Gomez. âHeâs been steady and heâs been constant, working on your behalf.â
During those remarks, a group of protesters blew whistles to express solidarity with Edward J. Snowden, the former N.S.A. contractor who says he gave the news media documents about the agencyâs surveillance programs, and Bradley Manning, the Army private accused of providing government documents to WikiLeaks. The protesters were drowned out by repeated chants of âObamaâ from the surrounding crowd.
Mr. Obama compared Mr. Markeyâs race to his own struggles with gridlock in Washington. âA whole bunch of Republicans out there are not interested in getting things done,â said Mr. Obama, who continued, âBecause of those attitudes, weâve got to have some Democrats like Ed Markey who will stand up and do the right thing.â
The crowd greeted Mr. Obama with louder and longer cheers than those for Mr. Markey â" although the president also elicited some playful boos when he brought up the forthcoming Stanley Cup playoffs between the Boston Bruins and his hometown team, the Chicago Blackhawks. The moment recalled another last summer, when he made an awkwardly-received comment about Kevin Youkilis, a longtime Red Sox player who was going over to the Chicago White Sox.
âI am not going to talk trash about the hockey game,â Mr. Obama said. âIâm not going to say anything about the outstanding qualities of the Chicago Blackhawks.â
Before the rally, a line of thousands snaked through part of the campus here and up a nearby street â" a show of popular excitement during a summery special election season that has so far been relatively quiet, especially when compared to the 2010 special election that brought Scott Brown to power here, and the high-octane battle in 2012 that saw Elizabeth Warren unseat him.
âI know it seems like thereâs an election every other week,â said Mr. Obama, according to a pool report, during a stop at Charlieâs Sandwich Shoppe in the cityâs South End on his way to the rally, âbut this oneâs important.â