ARLINGTON, Texas (AP) — Evan Gattis homered in a happy homecoming, aided by a favorable matchup.

The Astros slugger and Dallas native hit a two-run homer and an RBI single, and Gerrit Cole allowed one run over six solid innings as Houston topped the Texas Rangers 5-2 on Thursday night.

“I’ve watched a lot of games here growing up,” said Gattis, whose parents and brothers were in attendance. “I love this park. Sweet.”

It was Gattis’ 10th homer of the season, nine coming in his last 20 starts. It was Gattis’ fourth homer off Cole Hamels in 34 career at-bats.

“I know I’ve had some success against him,” Gattis said of Hamels. “I don’t know why. It’s been different pitches and different stuff, but maybe some guys you just kind of see better.”

Alex Bregman also homered for the Astros, and Jose Altuve had three singles after coming in with a big league-leading 85.

Cole (7-1) gave up just three singles – and none after the third inning – had eight strikeouts and walked three while throwing 102 pitches. He entered the game leading the American League in strikeouts (116) and was second in opponents’ batting average (.171).

“Try to minimize damage early knowing that the guys are going to be able to back us up,” Cole said.

Hamels (3-6) didn’t allow a hit until Bregman’s one-out double in the fourth. Altuve singled home Bregman to tie it at 1 and scored on Gattis’ two-out homer. Bregman chased Hamels with his homer in the eighth. Hamels gave up five runs and seven hits, struck out five and walked two in 7 1/3 innings, his longest start of the season. The six losses equal the most in a season during his time with Texas, which he joined midway through the 2015 season.

“Just not locating,” Hamels said. “If you at look everything that he’s hit and when he’s hit it throughout his career, a lot of balls down the middle.”

Texas took a 1-0 lead in the first inning on Adrian Beltre’s bloop single to center field that scored Shin-Soo Choo.

Choo had two singles and a walk to extend his 23-game on-base streak, which is the longest active run in the majors.

The game started after a 40-minute rain delay.

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)