The poll, released by Suffolk University in partnership with The Boston Globe and WBZ, found 42 percent of polled Massachusetts voters favored Kennedy ahead of the state’s Democratic primary.

Sen. Markey was backed by 36 percent of voters surveyed for the poll published on Sunday night, putting him just outside its margin of error going into the September 1 contest.

Rep. Kennedy, 39, launched his Senate primary challenge against Markey in September last year, saying it was “not the time for waiting” or “sitting on the sidelines” in a video announcing his campaign.

A poll conducted by Suffolk University shortly before the congressman’s primary bid was officially launched found that the grandson of Robert F. Kennedy had a 14-point lead over Markey when voters were presented with just those two names.

Five months on from his primary campaign launch, and a little under two weeks after his first TV debate with the incumbent senator, Rep. Kennedy III has seen that polling gap tightened by eight points.

But the latest Suffolk University/Boston Globe/WBZ poll also found that Kennedy had a clear lead over Markey on the question of who would be a greater adversary of President Donald Trump.

A little more than 41 percent of those polled said Rep. Kennedy would be “more of an adversary” against the commander-in-chief, while 22 percent said the same of Sen. Markey.

Yet when asked how they rated the congressional performance of the incumbent senator, polled Massachusetts voters were largely happy with Markey.

A little more than half (54 percent) said Sen. Markey had been either “excellent” or “good” during his time on Capitol Hill, while just 5.6 percent said he had performed poorly. A further 21 percent said Markey’s performance as a senator had been “fair.”

Newsweek has contacted Suffolk University for comment on its Massachusetts poll, and will update this article with any response.

The new Suffolk University poll surveyed 465 voters about the Massachusetts senate primary between February 26 and February 29. The survey has a 4.4 percentage point margin of error.

Although Rep. Kennedy is ahead of Markey in the polls, several high profile members of the Democratic party have fallen in behind the incumbent, including Alexandria Ocasio-Cortez.

In a video posted to social media in September, the freshman congresswoman endorsed Sen. Markey and said: “Ed Markey is a proud and strong progressive champion for working families, not just in Massachusetts, but across the country.”