Democrats are hoping the arrest of alleged political pipe bomber Cesar Sayoc becomes an explosive “October surprise” that propels their voters to the polls and turns the midterm election in their favor.

Sayoc, an avid supporter of President Trump, could not have been cast any better by Democrats. He had a van plastered with Trump stickers and anti-Hillary Clinton images and seems to be the perfect Republican villain.

The pipe bombs he tried to deliver may now be the rallying cry for Democratic pols eager to blame Trump and other Republicans for the plot to go after top Democrats and Trump critics.

He’s already being called the “MAGA bomber” and the “Trump bomber” — media characterizations that imply the president is responsible in some way for Sayoc’s actions.

No one went further to tie the pipe bomber to Republicans than Somerville Mayor Joe Curtatone. In a head-shaking display of ugly partisan rhetoric, Curtatone tweeted that Sayoc’s van “looks like the inside of Geoff Diehl’s head” — referring to the GOP candidate challenging U.S. Sen. Elizabeth Warren.

Curtatone’s shameless tweet may be over the top, but it plays into attempts by the Warren campaign to portray Diehl as an extreme right-wing devotee of Trump.

The mayor owes Diehl an apology, but no doubt the tweet was being cheered by many resistance Democrats.

Trump himself seems to recognize the political implications of Sayoc’s acts, saying in a tweet that the “bomb stuff” was slowing the “momentum” of Republicans heading into the midterms.

“Republicans are doing so well in early voting and now this ‘Bomb’ stuff happens and the momentum greatly slows — news not talking politics,” Trump tweeted. “Very unfortunate, what is going on. Republicans, go out and vote!”

That tweet was sent out before Sayoc’s arrest, but it shows Trump was thinking about the ramifications of the bomb threats on Republican chances of holding onto Congress.

Now that we know Sayoc is the alleged pipe bomber, the ramifications are clear — Democrats now have an issue to tie Republicans to the plot.

But whether they succeed at blaming Republicans remains to be seen.

The arrest comes 11 days before the midterm election, and there’s plenty of time for a new story to come along and replace the bomber narrative.

And Democrats have to be careful not to overplay their hand because some voters may find it offensive to try and gain political advantage over a bombing plot.

Curtatone’s tweet shows just how far some Democrats might go — and that could backfire.