ARLINGTON, Texas (AP) — Hunter Pence's homecoming and San Francisco's big bats trumped Cole Hamels' debut in Texas.

Pence had a game-tying RBI single with two outs in the eighth inning, three batters after Hamels left the game with a three-run lead, then homered leading off the 11th inning as the Giants rallied for a 9-7 victory over the Rangers on Saturday night.

"We have a lot of really tough outs in the lineup right now," Pence said. "All the way up and down. ... There's definitely a lot of confidence in the offense right now."

After Pence's tiebreaking homer off Sam Dyson (3-4), another pitcher in his first game for Texas, Brandon Belt hit his second homer of the game as the Giants won for the 14th time in 17 games. Former University of Texas player Belt's late homer came off Sam Freeman, who hadn't allowed a run in his previous 17 appearances.

Pence grew up in Arlington and went to the University of Texas-Arlington, a campus only a few blocks from the Rangers' ballpark.

Exactly one week after he no-hit the Chicago Cubs at Wrigley Field on 129 pitches, Hamels gave up eight hits and five runs in 7 2/3 innings against the Giants — who on July 10 at home had nine runs and 12 hits in 3 1/3 innings against the left-hander.

"I thought (Hamels) was on the top of his game. I know we scored off him, but I thought he had really good stuff," Giants manager Bruce Bochy said. "He was throwing hard, had a good changeup. Our guys did a good job of battling him."

Hunter Strickland (2-1), the seventh Giants pitcher, threw two scoreless innings before Santiago Casilla worked the 11th for his 27th save in 31 chances. Strickland has pitched 12 2/3 scoreless innings over his last 14 appearances.

Like 2008 World Series MVP Hamels, Giants rookie starter Chris Heston threw a no-hitter earlier this season and got a no-decision in this matchup. Heston, 5-0 with a 2.11 ERA his previous seven starts, gave up seven hits in 4 2/3 innings.

Hamels started with two no-hit innings before Belt's homer just beyond the reach of the glove of leaping center fielder Delino DeShields, who an inning earlier caught Buster Posey's towering flyball against the wall.

Belt's first homer was the first of five hits in a span of seven batters for the Giants. Joe Panik had an RBI double and scored on a single by Duffy, who was thrown out trying to go to second when the Rangers cut off the relay throw.

After Posey had a leadoff single in the fourth, he was retired on a double-play grounder and Hamels didn't allow another base runner until Posey's 15th homer leading off the seventh.

Hamels, who struck out and six and walked one, left after Panik's two-out double in the eighth. Reliever Tanner Scheppers then allowed three consecutive run-scoring hits to the only batters he faced, and the Giants got even 7-7 on Pence's single after back-to-back doubles by Matt Duffy and Posey.

"It was definitely unfortunate," Scheppers said. "Cole pitched a hell of a game and did such a great job. ... Just wasn't my day."

The Rangers completed an eight-player deal Friday to get Hamels, who is signed through 2018 with a club option for 2019.

"It's crazy. Getting here and getting ready for the game, you try to keep to your routine but at the same time it's a new clubhouse. It's a lot of new beginnings so you have to kind of find yourself," Hamels said. "But when you get onto that field the excitement is great."

NO-HITTER MATCHUP

The last matchup of starters who threw no-hitters earlier in the same season came in 2010, when there were two of them — Arizona's Edwin Jackson vs. Philadelphia's Roy Halladay, and Oakland Dallas Braden vs. Tampa Bay's Matt Garza.

TRAINER'S ROOM

Giants: RHP Tim Lineceum (7-4) started doing some soft toss Saturday, and manager Bruce Bochy said he's making progress. The two-time NL Cy Young last pitched June 27, when he got hit on his right arm by a line drive. Lincecum said he is confident that he will pitch again this season. "I don't see any reason why not," the pitcher said.

Rangers: C Robinson Chirinos was put on the 15-day disabled list with a left shoulder strain. Chirinos, who throws and bats right-handed, said he hurt himself taking on a swing in his final at-bat Thursday night.

UP NEXT

Giants: Mike Leake (9-5) makes his San Francisco debut. The 27-year-old right-hander, acquired from Cincinnati late Thursday night, allowed only two earned runs winning his last four starts for the Reds.

Rangers: Lefty Martin Perez (0-2) makes his fourth start since coming back from Tommy John surgery. He allowed eight runs in only one inning Tuesday in the Rangers' 21-5 loss to the New York Yankees.