Houston • Frankie Montas had a tough time in the first inning of his last two starts, giving up seven hits and five runs combined.

So when Oakland’s starter threw a perfect first against the defending World Series champion Houston Astros on Monday night, it was just the confidence boost he needed to get back on track and turn in a strong start.

Montas and two relievers combined for a five-hitter, Stephen Piscotty homered and hit an RBI single and the Athletics beat the Astros 2-0.

It took the 25-year-old Montas just eight pitches to retire All-Stars George Springer, Alex Bregman and Jose Altuve in the first.

“You go up against Springer, Bregman and Altuve and go 1-2-3, I bet you that gives you some confidence,” Piscotty said of Montas. “They’re a great offense. It was a pitcher’s duel the whole time, but he just went out there every inning and attacked.”

Houston starter Gerrit Cole struck out 11 and scattered three singles across six scoreless innings before Brad Peacock (1-4) took over for the seventh. Piscotty, who finished with three of Oakland’s six hits, greeted him with his home run to left field to make it 1-0.

“It was just a mistake,” Peacock said. “I’ve got some work to do on my slider. It’s not there right now.”

Piscotty added an insurance run with a single in the eighth.

The Athletics have won three in a row and 11 of their last 13. The loss snapped Houston’s six-game winning streak.

Montas (5-2) also allowed just three singles with two walks and two strikeouts in six innings after yielding 17 hits and nine runs combined in his last two starts.

Red Sox 5, Rangers 0 • In Boston, J.D. Martinez hit his major league-leading 28th home run, Steve Pearce added a two-run shot and Eduardo Rodriguez pitched 523 innings to lead the Red Sox over Texas and to their seventh straight win. Texas’ Adrian Beltre moved past Dave Winfield and into 20th place on the career hits list with his fourth-inning single. He now has 3,111, four behind Alex Rodriguez at No. 19.

Orioles 5-2, Yankees 4-10 • In Baltimore, Brett Gardner had four hits, homered and drove in three runs to help New York beat the Orioles 10-2 for a doubleheader split. In the opener, Danny Valencia snapped an 0-for-25 skid with a three-run homer off CC Sabathia, and Baltimore ended a six-game losing streak with a 5-4 victory.

Twins 3, Royals 1 • In Minneapolis, Eduardo Escobar had three hits and drove in the go-ahead run in the seventh to support Jose Berrios’ strong outing as Minnesota beat Kansas City. Escobar plated Joe Mauer with a seventh-inning single as Minnesota took advantage of Kansas City’s struggling bullpen to win its fifth straight game. Berrios (9-7), elected to his first All-Star game a day earlier, allowed one run on six hits.

Rays 10, Tigers 9 (10) • In St. Petersburg, Fla., Daniel Robertson hit an RBI single in the 10th inning and Tampa Bay won for the 12th time in its last 13 home games by beating Detroit. Kevin Kiermaier had a one-out triple off Blaine Hardy (3-2) in the 10th. After Matt Duffy walked, Robertson won it on his hit to center.

Reds 7, Indians 5 • In Cleveland, Anthony DeSclafani allowed one run in seven innings, Scott Schebler was 4 for 5 with a homer, and Cincinnati defeated the Indians. All-Star first baseman Joey Votto homered for Cincinnati, which took the opener of the team’s annual battle for the Ohio Cup.

Mets 4-1, Phillies 3-3 • In New York, Aaron Nola allowed one hit in seven shutout innings and lashed a three-run double that sent Philadelphia past the Mets 3-1 for a split of their twinight doubleheader. One night after being named to his first All-Star team, Nola (12-2) struck out 10 and won his sixth straight decision to become the only 12-game winner in the National League. In the opener, Wilmer Flores connected for a pinch-hit homer in the bottom of the 10th to give New York a 4-3 victory.

Marlins 4, Brewers 3 (10) • In Miami, backup catcher Bryan Holaday hit a walk-off RBI single with one out in the 10th inning, and the Marlins beat Milwaukee. Holaday, who came into the game batting .165, was in the lineup because the Marlins placed All-Star catcher J.T. Realmuto on the paternity list before the game.

Pirates 6, Nationals 3 • In Pittsburgh, Gregory Polanco drove in four runs in the first two innings and the Pirates went on to victory over Washington. Polanco hit a two-run double in the first as the Pirates started the game with four straight hits, then added a two-run home run in the second, his 13th of the season to extend the lead to 6-1.