Two Democrats battling to win the Democratic nomination to succeed Sen. John KerryJohn Forbes KerryLobbying world Kerry: Trump not pursuing 'smart' or 'clever' plan on North Korea Tillerson will not send high-ranking delegation to India with Ivanka Trump: report MORE (Mass.) have agreed to restrict outside spending from super-PACs and advocacy groups in their primary.

Reps. Ed MarkeyEdward (Ed) John MarkeyNet neutrality supporters predict tough court battle over FCC's repeal plan Avalanche of Democratic senators say Franken should resign Driverless car bill hits Senate speed bump MORE and Stephen Lynch modeled their pact after the deal between Democratic Sen. Elizabeth WarrenElizabeth Ann WarrenOvernight Regulation: Net neutrality supporters predict tough court battle | Watchdog to investigate EPA chief's meeting with industry group | Ex-Volkswagen exec gets 7 years for emissions cheating Overnight Tech: Net neutrality supporters predict tough court fight | Warren backs bid to block AT&T, Time Warner merger | NC county refuses to pay ransom to hackers Avalanche of Democratic senators say Franken should resign MORE and Republican Scott Brown in last year’s Senate race.

Under that agreement, a candidate who is the benefactor of outside advertising will have to pay 50 percent of the cost of airing the ad to a charity of the opponent’s choice.

But the new pact goes further than Brown and Warren by restricting direct mail from outside groups ­— something left out of last cycle’s pledge — as well as TV, radio and online advertising.

It is unclear if Republican candidates in the race will sign on to the pledge in the general election, where outside spending will have its greatest impact.

Gabriel Gomez, a local businessman and former Navy SEAL, told the Boston Globe he had not made a decision on the pledge. He entered the race earlier this week. 

The pact, dubbed the People’s Pledge, didn’t catch on in other Senate races last year, though a number of Democratic candidates did propose similar ideas. The success in Massachusetts seemed to hinge on Brown, a centrist Republican who supports campaign finance reform.

Brown and Warren’s pledge last year held up for the most part. In one of the most expensive Senate races in the country, outside spending was only about one tenth of what the two campaigns spent. Outside spending totaled about $8 million compared to $77 million spent by Brown and Warren.