Updated

Mike Aviles' go-ahead RBI single in the top of the ninth inning lifted the Boston Red Sox to a 2-1 win over the Texas Rangers in the middle installment of a three-game set.

Daniel Nava and Jarrod Saltalamacchia worked a pair of two-out pinch-hit walks against Joe Nathan (1-3) before Aviles slapped a looping base hit just over the outstretched glove of a leaping Elvis Andrus at shortstop, which plated Nava to make it 2-1.

"A couple of walks and a bloop, and we win," Red Sox manager Bobby Valentine said.

Alfredo Aceves worked around a two-out walk to nail down his 21st save of the season in the home half.

Boston had lost each of its three meetings against Texas this year while being outscored 33-7.

Red Sox starter Clay Buchholz surrendered a run on four hits and three walks, while the Rangers' Martin Perez lasted six innings, allowing a run on five hits and two walks.

Andrus had two hits, extending his streak to 11 games, and a run scored for Texas, which has dropped four of its last six.

"We had some chances, we just didn't get the hit," Rangers manager Ron Washington said. "They (Boston) ended up delivering."

Both teams were 0-for-5 with runners in scoring position before Aviles' single in the ninth.

Adrian Beltre left the contest in the eighth inning after being struck in the batting helmet with a fastball by Vicente Padilla (4-0), who picked up the win with a scoreless frame.

The Red Sox opened the scoring in the fourth. Cody Ross worked a leadoff walk and after Will Middlebrooks flied out and Carl Crawford struck out, Kelly Shoppach brought Ross home with a double to right, which David Murphy was unable to haul in at the warning track.

Texas, though, tied the contest in the sixth. Andrus ripped a one-out double to right, advanced to third on a wild pitch and scampered home on Josh Hamilton's groundout to shortstop, making it a 1-1 game.

Game Notes

Kinsler was picked off first base in the first and was ejected for arguing the call...Boston's Brent Lillibridge, who was designated for assignment on July 16, was traded to the Cleveland Indians earlier Tuesday in exchange for minor- league pitcher Jose De La Torre.