BOSTON (AP) — Eric Hosmer doubled to lead off the 14th inning and scored when Mike Aviles bunted the ball over the head of charging first baseman Adrian Gonzalez, giving the Kansas City Royals a 3-1 victory over the Boston Red Sox on Monday night.

Louis Coleman (1-2) went two innings and twice pitched out of jams for the win. Joakim Soria struck out three in the bottom of the 14th to earn his 18th save and send Boston to just its fourth loss in 21 games.

The Red Sox threatened to score five times in the last six innings, but the Royals made their best chance count. Hosmer doubled off Randy Williams (0-1) to start the 14th, but he was held at third when Jeff Francoeur singled.

Aviles came to the plate and squared to bunt as the runners took off and the corner infielders charged in. He popped it up — a potential triple play — but it landed safely behind Gonzalez and out of the reach of second baseman Dustin Pedroia, who was moving over to cover first.

Hosmer scored, and Francoeur came home on a sacrifice fly by Alcides Escobar to make it 3-1.

The Red Sox kept it interesting when Josh Reddick doubled — his third hit of the game — with one out in the bottom of the 14th. But Soria struck out Jarrod Saltalamacchia and then Marco Scutaro to end it — thanks in part to a pregame rain delay of 2 hours, 21 minutes — at 1:59 a.m. Tuesday.

Melky Cabrera had four hits and Hosmer had three for the Royals, who won for the fifth time in six games. It was their 10th extra-inning victory — most in the AL, according to STATS Inc.

The Red Sox had their chances.

Reddick singled to lead off the 12th and then, with one out, took two bases on an errant pickoff throw. But he was caught trying to steal home on what appeared to be a botched suicide squeeze after Scutaro never squared around to bunt; Scutaro then lined a hit to left and was thrown out trying to stretch it into a double.

In the 13th, Jacoby Ellsbury drew a leadoff walk and, one out later, Gonzalez hit a sinking liner that bounced under Francoeur’s glove as he came in for it; only his leg kept it from going off the wall. Ellsbury wound up at third, and Gonzalez at first.

Again, Coleman pitched out of it. The fifth of six Kansas City pitchers, he went two innings and allowed three hits and a walk.

In his first start since he left a no-hitter after four innings with a strained muscle in his back, Jon Lester returned from the disabled list and pitched 5 1-3 strong innings for Boston. He shut out the Royals until Cabrera led off the sixth with a single and scored to make it 1-1 when Billy Butler’s double rattled around in the left-field corner.

Dustin Pedroia singled in the third inning to extend his hitting streak to 22 games.

Kevin Youkilis pulled up limping after trying to stretch out an infield single in the sixth inning, and left the game with tightness in his right hamstring. He was replaced by Yamaico Navarro in the top of the eighth.

Notes: To make room for Lester on the roster, the Red Sox optioned righty Kyle Weiland to Triple-A Pawtucket. Manager Terry Francona had said RF J.D. Drew would go on the DL. … Pedroia’s hitting streak is the longest for a Red Sox 2B since Denny Doyle hit in 22 straight in 1975. Pedroia has reached base safely in 34 straight games. … Heading into the game, Lester had received an average of 7.32 runs per game in support, the most in the majors among qualifying pitchers. … Boston RHP Clay Buchholz threw 30 pitches off a bullpen mound and felt his strained lower back was improving. He has been sidelined since mid-June. … Reddick made a diving catch of Escobar’s liner in the top of the 10th to preserve the tie. … Starter John Lackey went out to the bullpen before the 14th inning but did not warm up. … Josh Bard pitched a scoreless eighth inning. He has not allowed an earned run in 25 innings over 24 games. … Kyle Davies made his fourth start for the Royals since going on the DL on May 16th with right rotator cuff inflammation. He lasted six innings, allowing one run on five hits and a walk while striking out six. … Royals C Brayan Pena singled in his first at-bat to snap an 0-for-12 drought.