Follow CBSDFW.COM: Facebook | Twitter

ARLINGTON, Texas (AP) –  Josh Hamilton hit a two-run homer and Martin Perez allowed only two hits to earn his first win in his comeback from Tommy John surgery as the Texas Rangers edged the San Francisco Giants 2-1 on Sunday.

READ MORE: 2 Teenaged Brothers Shot And Killed In North Richland Hills

Perez (1-2) threw 8 1-3 innings, leaving after allowing a one-out, ninth-inning double to Angel Pagan. Sam Dyson earned his first career save, getting a game-ending double play after allowing a bases-loaded, RBI single to Buster Posey.

In Perez’s previous start last Monday, he failed to get through the second inning against the New York Yankees and allowed eight earned runs in a 21-5 loss.

Hamilton homered into the right-field corner off Mike Leake (9-6), who made his first start with San Francisco. Before that, Texas had put eight runners on without scoring.

Perez struck out six and walked none, throwing 80 pitches.

This was Perez’s fourth start in his return from elbow surgery in May 2014. He hadn’t previously worked more than six innings.

Two of Hamilton’s five homers this season, which began in late May after being reacquired from the Los Angeles Angels in late April, have come in the last four games.

Leake, acquired from Cincinnati last Thursday for two minor league prospects, allowed two runs on eight hits in 6 1-3 innings. He won his last four starts with the Reds, allowing only two earned runs in 30 innings.

READ MORE: All Lewisville ISD Schools Closing Temporarily Due To Staffing Shortages

Texas took the weekend series 2-1 in winning a home rubber game for only the second time in six tries.

The Rangers, with the third-worst home record in the majors, have won four of their last five games at Globe Life Park.

The Giants’ 11-4 record since the All-Star break is second only to Philadelphia’s 12-3.

TRAINER’S ROOM

Giants: 2B Joe Panik missed his third game in six days because of back stiffness. Manager Bruce Bochy said Panik might need to also miss Monday’s game.

Rangers: RHP Tanner Scheppers, Texas’ eighth-inning setup man, was placed on the 15-day disabled list with left knee inflammation. To fill his spot on the active roster, RHP Phil Klein was recalled from Triple-A Round Rock.

UP NEXT

Giants: Atlanta will be the middle stop of a three-city, 10-game road trip. RHP Matt Cain (2-2) allowed four runs in six innings last Wednesday losing at Milwaukee.

MORE NEWS: Driver Killed In Rollover On I-20 Exit Ramp In Arlington

Rangers: RHP Colby Lewis (11-4) will start at home against Houston, one day following his 36th birthday.(© Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)