BOSTON — Marco Hernandez scored the go-ahead run on a wild pitch in Boston’s four-run eighth inning, helping the Red Sox beat the sloppy Chicago Cubs 6-2 on Sunday night.

The Red Sox took two of three in the lively weekend series that featured a strong showing for Cubs fans, chants in support of each side, and the World Series trophies that ended long title droughts for the once-frustrated franchises.

Hanley Ramirez hit a two-run homer for Boston, and the Red Sox got two more runs on shortstop Addison Russell’s throwing error in the eighth.

Kris Bryant homered for Chicago, extending his hitting streak to 11 games.

Boston has won 19 of its last 22 interleague series at Fenway Park.

Hernandez led off the eighth with a grounder to first baseman Anthony Rizzo, who relayed the ball to reliever Koji Uehara (0-2). But a hustling Hernandez was safe at first on a bang-bang play.

Xander Bogaerts and Andrew Benintendi then singled, loading the bases. Pedro Strop came in and bounced a 2-2 pitch to Ramirez, bringing Hernandez home. Mitch Moreland’s grounder scored a run before Russell’s error.

Chicago trailed 2-1 before Jon Jay scored from second after reliever Joe Kelly bounced a pitch past Christian Vazquez in the seventh.

Jay’s headfirst slide beat Vazquez’s throw to Kelly after the catcher couldn’t find the ball for a few seconds. He was originally called out, but the call was challenged.

After playing the first two games in summer-like temperatures, the teams took the field to a chilly 47 degrees.

That didn’t seem to affect the distance of Ramirez’s homer, estimated at 440 feet after it completely left Fenway Park over the Green Monster seats in the first.

On Saturday, he had one estimated at 469, the longest at Fenway this season.

Bryant homered to deep center.

Boston starter Eduardo Rodriguez struck out nine over six innings, allowing one run and five hits.

Chicago’s Kyle Hendricks gave up two runs and three hits in six innings.