CHICAGO (AP)Pitcher Rowan Wick threw Trevor Story’s comebacker down the right-field line for a two-run error with two outs in the 11th inning, and the Boston Red Sox outlasted the Chicago Cubs 4-2 on Sunday to avoid a three-game sweep.

With automatic runner Bobby Dalbec on second, Wick (1-3) walked Christian Arroyo leading off the 11th. Jarren Duran struck out and Rafael Devers popped out before Story hit a soft hopper that Wick threw well over first baseman David Bote.

In a game that took 4 hours and 25 minutes, Boston won for the second time after a seven-game winning streak. The Red Sox finished a 5-4 road trip and headed home for the start of 17 straight games against AL East rivals.

”We got lucky,” Red Sox manager Alex Cora said. ”Tonight was a grind.”

Red Sox shortstop Xanger Bogaerts left in the second inning with a left thigh laceration after Willson Contreras slid into him while caught stealing second. Cora said Bogaerts needed seven stitches.

”We’ll hop on the plane and see how he feels tomorrow,” Cora said.

Bogaerts said he didn’t think Contreras meant to harm him, and he didn’t mean to block the base as Contreras was arriving.

”I didn’t know where the plate was,” Bogaerts said. ”I know he probably didn’t do it on purpose. My foot being in that position, it shouldn’t be there either.”

Boston stopped Chicago’s four-game winning streak, which had tied the Cubs’ season high.

”They put up a fight, man,” Bogaerts said. ”I’ve been on teams like that before where you have young guys that want to go out there, play, prove a point and prove that they belong and want to stay here and impress everyone.”

Contreras hit an RBI single in the first.

Boston tied the score in the fourth when with runners at the corners, Franchy Cordero’s infield popup fell for an RBI single. Second baseman Christopher Morel appeared to settle under the ball, but lost it in the sun. Wind blew the ball to the right side, and it fell off the glove of first baseman Alfonso Rivas, who tried for a basket catch.

Keegan Thompson forced in the go-ahead run with a bases-loaded walk to Duran later in the inning after getting ahead in the count 0-2.

Patrick Wisdom tied the score in the eighth against Matt Strahm with his 16th homer, a 450-foot drive to center.

Jake Diekman (3-0) struck out four in two hitless innings.

Red Sox starter Connor Seabold, recalled from Triple-A Worcester, allowed one run and six hits in four innings. The 26-year-old was determined to make the most of his third big-league start after Toronto burned him for seven earned runs on nine hits on June 27.

Thompson gave up two runs, seven hits and three walks in four innings.

”I wasn’t really hitting spots much,” Thompson said. ”Usually, if I’m hitting my spots, then those two-strike pitches are put-away pitches instead of the weak contact, infield hits.”

TRAINER’S ROOM

Boston: RHP Matt Barnes, sidelined since May 30 with right shoulder inflammation, is to face batters Monday. . DH J.D. Martinez, in a 1-for-21 slide, had Sunday off. … RHP Phillips Valdez was optioned back to Worcester a day after being recalled due to LHP Rich Hill’s knee injury.

Chicago: RHP Alec Mills (lower back strain) was placed on the 15-day IL on Sunday after exiting Saturday’s start after just seven pitches. … Chicago recalled RHP Michael Rucker from Triple-A Iowa. … OF Seiya Suzuki (finger sprain) was scheduled to return from Triple-A Iowa on Sunday and is expected to be activated from the 10-day IL on Monday. … RHP Marcus Stroman allowed five runs, seven hits and a walk over 2 2/3 ininings during a rehab start for Triple-A Iowa against Columbus on Sunday as he returns from right shoulder inflammation that has sidelined him since June 3. … Ross said OF Jayson Heyward has not undergone an MRI as he remains on the 10-day IL due to right knee inflammation. … Cubs manager David Ross said 1B Frank Schwindel (lower back strain) and 2B Nick Madrigal (left groin strain) will face LHP Daniel Norris (left index finger strain) in batting practice on Tuesday. … RHP Drew Smyly (oblique strain) is scheduled for a rehab start with High-A South Bend on Monday.

UP NEXT

Boston: RHP Michael Wacha (6-1, 2.69 ERA) is slated to start Monday against Tampa Bay.

Chicago: LHP Justin Steele (3-5, 4.39 ERA) will start Monday to open a three-game series in Milwaukee.

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports