KANSAS CITY, Mo. (AP) — Aledmys Díaz singled in the go-ahead run in the 10th inning and the Houston Astros beat the Kansas City Royals 6-3 on Thursday, avoiding a four-game sweep.

Díaz finished 3-for-4 with a double and two RBIs for the AL West leaders. With the bases loaded in the 10th, he fouled off a 3-2 pitch from Wade Davis and drove the next one up the middle.

“I was looking for a pitch in the middle,” Díaz said matter-of-factly.

Houston added two more runs on a bases-loaded walk by Chas McCormick and a sacrifice fly by Taylor Jones.

“We haven’t been very good in extra-inning games,” Houston manager Dusty Baker said. “That’s one more extra-inning game that we won.”

Baker is excited about the stretch run for his team, which leads Oakland by 2 1/2 games in the division.

“I’ve been scoreboard watching every day,” he said. “Scoreboard watching is something I do between innings when I’m not thinking about what to do. We’re just looking forward to the finish line. We have a ways to go, and we haven’t played our best ball yet.”

Ryan Pressly (5-1) worked a scoreless ninth for Houston. Christian Javier pitched a perfect 10th for his second save.

Davis (0-3) allowed two hits and a walk in the 10th and did not record an out.

Royals manager Mike Matheny was happy with his team's series against a tough opponent.

“We made our way through the clubhouse and made sure the guys know that’s a great series,” Matheny said. “The pain of this one is hard, but overall we went about this whole series the way we want to.”

Nicky Lopez hit a two-run homer in the third to put the Royals ahead 3-0, his first home run since Aug. 8, 2020 — a span of 464 at-bats.

Carlos Correa led off the fourth with a double for the Astros. He went to third on a single by Díaz, but the Astros only scored once, on a fielder’s-choice grounder by McCormick.

Houston tied it in the sixth. Correa had a one-out single and scored on a double by Díaz, who then scored on a double by McCormick, chasing Royals starter Mike Minor.

“You can tell what (Díaz) means to this club (by looking at) the six weeks he was out,” Baker said. “That was expensive to have him and (Bregman) out at the same time.”

TRAINER’S ROOM

Astros: RHP Jose Urquidy (right shoulder) will begin a rehab stint Friday with the team’s Florida complex team. He has not pitched since June 30.

Royals SS Adalberto Mondesi (left oblique strain) was to begin another rehab assignment Thursday night with Triple-A Omaha. Mondesi’s last rehab assignment was cut short with tightness in his oblique on Monday. He’s played in only 10 games this season, hitting .361 with four homers.

UP NEXT

The Astros return home to play a three-game series against division rival Seattle. RHP Lance McCullers Jr. (9-4, 3.22 ERA) will get the start against the Mariners’ Yusei Kikuchi (7-6, 3.82).

The Royals head to Chicago to face the Cubs. RHP Brad Keller (7-12, 5.62) starts for Kansas City on Friday against RHP Zach Davies (6-9, 5.00).

___

More AP MLB: https://apnews.com/hub/mlb and https://twitter.com/AP_Sports