BOSTON (Reuters) - Incumbent Democratic U.S. Senator Jeanne Shaheen of New Hampshire is holding off a challenge from Republican Scott Brown, according to a poll released on Wednesday, although the former U.S. senator from Massachusetts is gaining ground.

Shaheen has the support of some 50 percent of registered voters, with 42 percent favoring Brown, who stunned Massachusetts Democrats in 2010 when he won a U.S. Senate seat that had been held by liberal Edward M. Kennedy for a half-century, according to the NBC News/Marist College poll.

Brown lost his re-election bid in 2012 and late last year moved back to neighboring New Hampshire, where he grew up, in anticipation of this year's campaign.

Shaheen's 8 percentage point lead in the latest poll was narrower than two surveys last month that found her up by 10 points.

Six percent of voters remain undecided, according to the NBC/Marist poll.

Majorities of independent and moderate voters support Shaheen, a former New Hampshire governor, and 52 percent of voters overall view her favorably, while just 40 percent of the 1,342 voters polled from July 7 through 13 viewed Brown favorably.

New Hampshire is one of the states Republicans have targeted as vulnerable as they attempt to take a majority in the Democratic-controlled U.S. Senate and Brown's campaign has attracted endorsements from high-profile Republicans including former Massachusetts Governor and failed 2012 presidential candidate Mitt Romney and former Florida Governor Jeb Bush.

Brown, who has focused much of his campaign on attack President Barack Obama's signature healthcare reform law, faces two Republican challengers in the September primary, Bob Smith, a former U.S. senator, and Jim Rubens, an entrepreneur and former state senator.

(Reporting by Scott Malone; Editing by Bill Trott)