OAKLAND, Calif. — Even before the video review, Eduardo Rodriguez realized speedy Marcus Semien was safe at first base.

Rodriguez’s no-hit bid for the Boston Red Sox was broken up after a replay reversal with two outs in the eighth inning, and Khris Davis hit a game-ending double in the ninth that sent the Oakland Athletics to a 1-0 victory Sunday.

Retiring Red Sox slugger David Ortiz offered Rodriguez a hug after he came off the field and these words: “You did the best job you could do — buen trabajo in Spanish,” Rodriguez recalled.

Trying to complete Boston’s first no-hitter in eight years, Rodriguez stuck out his right leg to knock down Semien’s grounder in the eighth. The left-hander had to search for the ball in the dirt on the mound before scooping it up and making a quick throw to first.

Semien initially was ruled out by umpire Laz Diaz. A’s manager Bob Melvin challenged the call, which was overturned after a brief review that lasted approximately 19 seconds.

Replays clearly showed Semien was safe, just as Rodriguez knew they would. And the infield single ended his run at a no-hitter in frustrating fashion.

“You’ve got to ask everybody who’s lost a no-hitter how it feels,” said Rodriguez, who came the closest he ever has to throwing a no-no.

Rodriguez got the final out of the eighth, keeping the game scoreless. After that, his day was done.

“He was outstanding and unfortunately he gets a ball off his shoe that he can’t seemingly find, and that’s the end of a potentially history-making day here,” Red Sox manager John Farrell said.

In the ninth, Brock Holt misplayed Davis’ double in deep left field for an error that allowed Danny Valencia to score from first base.

Valencia drew a leadoff walk against Craig Kimbrel (2-4), and the A’s averted a three-game sweep.

Oakland snapped a five-game losing streak overall, and a nine-game skid to Boston.

Ryan Madson (5-4) pitched the ninth for the win.

Oakland has not been held without a hit since four Orioles pitchers turned the trick on July 13, 1991 — the longest active streak in the majors.

Boston right-hander Rick Porcello carried a bid for a perfect game into the sixth inning of an 11-2 victory Saturday. Jake Smolinski broke that one up with a double.

Jon Lester tossed the most recent no-hitter for the Red Sox on May 19, 2008, against Kansas City.

Ortiz received a standing ovation before his initial at-bat, when he struck out swinging to end the first.

He went 0 for 2 with two strikeouts and two walks after going 5 for 6 with five RBIs in the first two games of the series.

“It’d be nice if he took a day off,” Melvin joked before the game. “He’s performing as well as he ever has.”

For the upcoming interleague series at San Diego, Big Papi will be available to pinch hit but Farrell has no plans to use him on defense.

After Boston outscored Oakland 27-4 over the previous two games, neither team could capitalize Sunday until the very end.

The Red Sox had scored at least 11 runs in all five previous meetings this season.

Oakland’s first win in six tries against the Red Sox meant the A’s avoided going winless for the fourth time against an AL team in one season. They went 0-11 against Baltimore in 1978, 0-7 versus Cleveland in 1995 and 0-6 when facing the Indians in 1994.

A’s starter Kendall Graveman struck out seven in 6 1/3 sharp innings.

“You know they’re going to put some good swings on you and today a couple of balls were hit hard right at people, and that helped us,” he said.

Dustin Pedroia has an 11-game hitting streak and has hit in 20 straight against the A’s.

MONCADA’S FIRSTS

Cuban star Yoan Moncada made his major league debut Friday, got his first hit and RBI with a run-scoring double Saturday, then was picked off and committed an error at third base Sunday.

His glove came through when it mattered behind Rodriguez: Moncada snagged Billy Butler’s hard liner to start the seventh.

TRAINER’S ROOM

Red Sox: Rookie OF Andrew Benintendi (left knee sprain) played catch for the first time and has taken some dry swings. … RHP Clay Buchholz will start Tuesday at San Diego in place of Steven Wright, who will travel with the team with plans for a second opinion on his injured pitching shoulder. … RHP Koji Uehara, on the disabled list since July 20 with a right pectoral strain, is scheduled to be activated Monday and available as the first option out of the bullpen as soon as Tuesday, Farrell said.

Athletics: Rehabbing pitchers Felix Doubront (left elbow) and Chris Bassitt (right elbow) were scheduled to play catch out to 90 feet Monday as they each recover from Tommy John surgery.

UP NEXT

Red Sox: LHP Drew Pomeranz (2-3, 4.06 ERA) faces his former Padres club on Monday in San Diego. Pomeranz was traded by the Padres on July 14.

Athletics: RHP Raul Alcantara will make his major league debut Monday against the visiting Los Angeles Angels.