U.S. Senate candidate Ed Markey shakes hands with a supporter in Boston, Tuesday, April 30, 2013 as he celebrates winning the Democratic primary for the special U.S. Senate election. Markey and Republican former Navy SEAL Gabriel Gomez won their party primaries Tuesday, setting up a race between a 36-year veteran of Washington politics and a political newcomer for the U.S. Senate seat formerly held by John Kerry. (AP Photo/Elise Amendola) Rep. Ed Markey in Boston on April 30, 2013. (Elise Amendola/AP)

President Obama will visit Boston next Wednesday to campaign for Rep. Ed Markey (D-Mass.), who is running in a special election to fill the Senate seat vacated by Secretary of State John F. Kerry.

Last week, first lady Michelle Obama stumped in Boston for Markey, headlining a fundraiser that raised more than half a million dollars for the Democrat, who is running against Republican Gabriel Gomez.

Markey campaign spokesman Andrew Zucker said President Obama will be in Boston next Wednesday on behalf of Markey, but could not say whether Obama would appear at a private fundraiser or a public event or both. A White House official said only that Obama would attend an event for Markey's campaign and the Massachusetts Democratic Party.

The Boston Herald reported Tuesday afternoon that Obama would hold a fundraiser at Copley Plaza for Markey.

Obama hopes to leverage his popularity in a solidly Democratic state he won handily in his reelection last year, although his track record of helping other Democrats in Massachusetts is mixed.

In 2010, Obama campaigned for Democrat Martha Coakley during a special election to fill the seat vacated by the late Sen. Edward M. Kennedy (D-Mass.), but Coakley ended up losing to underdog Republican Scott Brown.