BALTIMORE -- Ryan Rua had a tiebreaking, pinch-hit three-run homer in the seventh inning and the Texas Rangers held on to beat the Baltimore Orioles 5-4 Friday night to snap a three-game losing streak.
Cole Hamels (5-8) won for the first time in almost a month, allowing four runs and five hits with three strikeouts and one walk over 6 1/3 innings in a matchup of last-place teams.
Rua broke a 1-1 deadlock with the first pinch-hit of his career, off rookie Tanner Scott. Nomar Mazara added an RBI double later that inning, which made it 5-1 and boosted Scott's ERA from 5.88 to 6.84 over 26 appearances.
Baltimore pulled within a run on Caleb Joseph's three-run double against reliever Jose Leclerc in the bottom half of the inning. The Orioles loaded the bases in the eighth but Jake Diekman got out of the jam by getting Chris Davis on a short pop out.
Keone Kela got the last three outs for his 23rd save.
The Orioles have lost 17 of 20 and fell to 14-33 at Camden Yards, the second-worst home mark in the majors behind Kansas City.
Joey Gallo gave the Rangers the lead when he led off the fifth with a home run off Alex Cobb (2-12). The Orioles answered in the bottom half when Adam Jones hit a double just inside the left-field foul line and later scored on a sacrifice fly by Danny Valencia.
Cobb left his previous start against the Twins in the sixth inning with a blister on his right index finger. He did not appear hampered by the injury and allowed two runs and six hits with three strikeouts and no walks over 6 1/3 innings.
Rangers DH Shin-Soo Choo, who was celebrating his 36th birthday, hit a single in the third to extend his club record on-base streak to 49 games. It's also the longest streak in the majors in the last 10 years. ... Hamels has struck out at least one batter in 320 straight games.
STATS AND FACTS
The Orioles used their 90th different lineup, the most in the MLB. ... Baltimore 1B Davis stole a base for the first time since last Sept. 24.
Orioles: RHP Chris Tillman (back) will have another rehab start for Triple-A Norfolk on Sunday. He could be added twwwwwwwwwwo Baltimore's roster after the All-Star break, manager Buck Showalter said.
Rangers: LHP Martin Perez (2-3. 9.67 ERA) will come off the 60-day DL from an elbow injury and make his first start since April 29. He went 2-0 with a 0.52 ERA and 19 strikeouts in three rehab outings (17.1 nnings).
Orioles: Rookie Yefry Ramirez (0-3, 3.93 ERA) will make his fourth start of the season. He allowed four runs and nine hits over four-plus innings in a loss to the Yankees on July 9.
More AP baseball: https://apnews.com/tag/MLBbaseball