President Barack Obama arrived in Boston Wednesday to headline a campaign rally for U.S. Rep. Ed Markey, hoping to give him a boost over Republican Gabriel Gomez in the state’s special election for Senate.

Obama put his arm around Markey and waved to the crowd of thousands at the Reggie Lewis Track and Athletic Center in Roxbury.

"I’ve gotta have folks in the United States Senate who are willing to stand up for working people just like I have," Obama said. "I need folks in the United States Senate who everyday are waking up thinking about the people who sent them there and thinking, 'How do I make sure I get them a brighter future?' That’s who Ed Markey is. I need Ed Markey in the United States Senate.”

Obama described Markey as a fighter for the environment, gun control and the middle class.

“Ed’s one of you," Obama said. "Think about Ed’s history. Grew up a few blocks from here in Malden. Son of a milk truck driver. Ed sold ice cream in college to help pay the bills."

Obama also joked that he wouldn’t talk about the Chicago Blackhawks, who are playing against the Boston Bruins for the Stanley Cup.

“I’m not going to say anything about the outstanding qualities of the Chicago Blackhawks. I’m not going to say anything. I'm not gonna do it. Because I don’t want to make y’all feel too bad.”

A Suffolk University poll released Monday shows Markey's lead over Gabriel Gomez narrowing as the campaign heads into its final two weeks.

At the rally, Obama said the election is going to come down to turnout, and urged Democrats to knock on doors, and tell their friends to vote for Markey.

Democrats are hoping to avoid a repeat of the last special election that sent Republican Scott Brown to the United States Senate.

The campaign stop comes as Obama is facing a string of controversies from the IRS targeting conservative groups to widespread NSA surveillance. The struggles have cut into his public approval ratings, but that was hard to tell from the adoring reception he got in Roxbury.

Supporter Hattie Thorpe from Dorchester defended the man she calls her favorite president.

“They’re trying to blame him for everything," she said. "Everything that comes up, it’s Obama’s fault. But he didn’t create these situations.”

In welcoming Obama from the stage, Markey underscored the importance of this election to the president's agenda. Meanwhile, Markey's opponent, Gomez, sent an open letter to the president, welcoming him to Boston and saying he wants to work with the president if he wins.

The special election takes place June 25th.