BOSTON — After an ominous beginning, Kyle Gibson put a decisive end to Boston’s two-game hitting outburst.

Gibson allowed a pair of hits in the first inning, then none over the next seven as the Minnesota Twins edged Boston 2-1 Friday night.

“This team is a good team – a really good team,” Gibson said. “That’s a tough lineup to navigate.”

Gibson navigated it better than anyone else has lately against the Red Sox, who had won three straight and 9 of 10. Mookie Betts homered for Boston on the second pitch and Xander Bogaerts singled during a brief scare that Gibson got himself out of, and then he pitched seven more stellar innings.

“Kind of as a rule of thumb, a solo homer is not gonna beat you, whether it’s the first guy or in the seventh inning,” Gibson said. “You just get it out of your mind and get back to attacking guys and making pitches.”

Brian Dozier hit a solo home run for the Twins in the second inning and Miguel Sano added an RBI single in the sixth. It was all the scoring Minnesota needed, as Gibson (3-6) did the rest before Brandon Kintzler took over and survived a wild bottom of the ninth.

Michael Martinez and Dustin Pedroia started the inning with consecutive singles and Bogaerts walked to load the bases with nobody out and slugger David Ortiz coming up next.

Ortiz hit a grounder to second, which Dozier threw home for the force out, and catcher Juan Centeno doubled up Ortiz at first.

“You don’t want really want Papi to come up in the situation, but he’s still a groundball away from two outs,” said Kintzler, who got his seventh save.

“It’s not like I drew it up like that. But that’s what it is. It’s one of those moments where either he’s going to beat me or I’m gonna get him.”

Hanley Ramirez lined out to right to end the game and Boston’s three-game winning streak.

The Red Sox got a leadoff homer Betts for the second straight night. Dustin Pedroia struck out but reached first safely when catcher Juan Centeno couldn’t stop a wild pitch, and Bogaerts followed with a single.

That was the last hit for Boston until the Red Sox threatened in the ninth.

“Gibson was the story,” Twins Manager Paul Molitor said. “He settled down, minimized the damage in the first, and then he just started making pitch after pitch, inning after inning.”

The Red Sox had 33 hits in their previous two games, including 17 Thursday night in a 13-2 rout of the Twins. Gibson quickly cooled off Boston’s batters after the scare in the first.

“I don’t know, but he should keep on throwing it the rest of the season,” Ortiz said when asked what Gibson threw that was so effective. “If the game would have been that easy, it wouldn’t be the way it is. They know how to get a hitter out. They know how to get that done. It’s not always going to work in our way. Sometimes it’s going to work in their way, too.”

Eduardo Rodriguez (2-4) allowed two runs on six hits and struck out eight and walked one over 5 1/3 innings for Boston. Joe Mauer was the only batter Rodriguez walked, reaching with one out in the sixth before Heath Hembree took over for the Red Sox.

TOUGH TWINS

Gibson’s performance was exactly what the Twins needed after the humbling results in the series opener Thursday.

“Coming in here and facing this team, as hot as they are, and the way they are swinging the bats and the way we got pummeled last night, I thought it was a really impressive rebound by him to help us get back on track and give us a chance to win,” Manager Paul Molitor said.

MISSING MOOKIE

Betts did not take the field in the top of the fifth. Martinez took over in right field, and the Red Sox announced a few minutes later that Betts had left the game because of soreness in his right knee.

Betts, an All-Star Game starter, leads the Red Sox with 127 hits and is second on the club with 20 home runs and 63 RBI. His status is considered day-to-day, and Farrell wasn’t sure when Betts would return to the lineup.

“We wouldn’t take any risks with Mookie, certainly,” Farrell said.

TRAINERS ROOM

TWINS: Catcher Kurt Suzuki was not in the starting lineup, getting some rest and avoiding the heat. The temperature at gametime was 92 degrees. Molitor said Suzuki should return Saturday.

RED SOX: Right-hander Junichi Tazawa (right shoulder impingement) returned to the roster after being activated from the 15-day DL.

UP NEXT

TWINS: Right-hander Ricky Nolasco (4-8, 5.02) makes his team-high 20th start. Nolasco also shares the team lead for losses, picking up his eighth Monday despite holding Detroit to one run on three hits and three walks in six innings.

RED SOX: Left-hander David Price (9-7, 4.36) gets his first start since taking the loss Sunday when the Yankees ended Boston’s six-game winning streak. Price struck out just one batter in 5 2/3 innings, ending a string of three straight starts with at least 10 strikeouts.