Mark Canha hit an RBI single with one out in the bottom of the ninth inning and the Oakland Athletics again beat Houston with their final swing, edging the AL West-leading Astros 4-3 Sunday.

The A’s swept the three-game series to move up in the playoff chase. They began the day four games behind AL wild card co-leaders Boston and New York by four games, with Toronto and Seattle also in the mix.

Alex Bregman homered for the Astros, whose magic number to clinch the division stayed at 2.

"I’m glad we’ve got an off day tomorrow," said Houston manager Dusty Baker, whose club ended a streak of 17 games in 17 days. "This was a tough series. Two walk-offs and the other game was close until the end. This was tough. It was real tough. Things will change, I know it."

A day after Starling Marte hit a game-ending double to beat Houston 2-1 — with Elvis Andrus breaking his leg as he scored his winning run — the A’s again struck in the ninth.

Sean Murphy led off with a single against Ryne Stanek (3-5) and Vimael Machin’s bunt popped past diving first baseman Yuli Gurriel for a hit, a passed ball moved both runners up.

Marte popped out and Matt Olson was intentionally walked before Ryan Pressly replaced Stanek. Canha, who had an RBI single in the seventh, hit Pressly’s first pitch off the wall in left-center.

"I try not too look for pitches as much as just try to get into the flow of the at-bat and usually that means not swinging at the first pitch," Canha said. "But this AB, I felt good. I said to myself, ‘If you see it well, let it rip.’ I just saw it well out of the hand."

The Astros missed a chance to take the lead in the ninth when Jose Siri was thrown out trying to score from first on Bregman’s bloop single. Siri, who reached on a one-out single, hesitated halfway to second, paused again as he headed to third, then was tagged out sliding into home following a strong relay throw from second baseman Tony Kemp.

"He’s one of the fastest players in the big leagues and he’s super aggressive," Bregman said if Siri. "I’ve seen him score on that play many times. I like the aggressiveness from him."

Baker said replays showed third base coach Omar Lopez initially wave Siri around before trying to stop him.

"Maybe he took his eye off Omar," Baker said. "These things are going to happen. I can’t fault him for exuberance. You have to pick up the coach the second time, that’s all."

Lou Trivino (7-7) retired three batters to win.

"We’re getting big hits when we need to at this point," A’s manager Bob Melvin said. "There’s a lot of desperation in what we’re doing right now."

Trailing 3-1, the A’s scored twice off the Astros bullpen in the seventh. Marte had an RBI groundout and Canha’s two-out infield single drove in pinch-runner Skye Bolt.

Kemp finished with three hits.

The Astros were held hitless through the first four innings by Paul Blackburn before Jason Castro reached on an infield single. Castro scored on Siri’s infield single two batters later.

STARTING OFF

Blackburn retired 14 of the first 15 batters he faced before the Astros broke up his no-hit bid. Blackburn allowed three hits and one run in five innings. Astros starter Jake Odorizzi gave up four hits and one run in four innings after being activated from the injured list before the game.

A’S HONOR EQUIPMENT MANAGER

Longtime A’s equipment manager Steve Vucinich, who is retiring after 54 years with the team, was honored with a framed No. 54 jersey during a pregame ceremony. The team later announced that the home clubhouse at the Coliseum will be renamed after Vucinich.

"I am overwhelmed and humbled," Vucinich told the crowd. "I think I am rooted in Oakland as much as anybody."

TRAINER’S ROOM

Astros: RHP Seth Martinez was optioned to the taxi squad.

Athletics: 2B Josh Harrison left the game with an undisclosed injury after the fifth inning. … Andrus was placed on the 10-day injured list with a fractured left fibula suffered when he scored the winning run Saturday. It is unknown whether Andrus will require surgery. … INF Jed Lowrie was put on the IL with a sprained right wrist. … Reliever Sam Moll was activated from the paternity list. INF Vimael Machin was recalled from Triple-A Sacramento.

UP NEXT

Astros: Houston has an off day before RHP José Urquidy (8-3, 3.56 ERA) faces the Tampa Bay Rays on Tuesday. Urquidy has won his last four decisions.

Athletics: LHP Cole Irvin (10-14, 3.99) faces the Mariners for the fifth time this season after losing the previous four against Seattle.