BOSTON (AP) -- Chris Tillman isn't concerned about his steadily increasing win total or about further establishing himself as the ace of the Orioles staff.
The right-hander knew the victory was more important to his team.
Tillman pitched seven strong innings to earn his 15th victory of the season, and Baltimore beat the Boston Red Sox 3-2 on Thursday night to avoid a three-game sweep. The victory helped the Orioles pull within 3 1/2 games of Oakland in the race for the second AL wild-card spot.
''I'm glad we got a 'W' for him,'' manager Buck Showalter said. ''We've got 30 games left. September's an eternity. It'll edge by, and that will be good for us 'cause we're trying to catch up.''
Manny Machado had two hits for the Orioles, including a two-run double that gave them the lead for good in the third inning. Danny Valencia had two doubles and Adam Jones also had a pair of hits for Baltimore, which opens a three-game series with the Yankees in New York on Friday.
Jim Johnson pitched the ninth for his AL-leading 41st save.
''We're going to New York with an upbeat clubhouse,'' said Tillman, who improved to 6-2 when starting after an Orioles loss. ''It's a starting pitcher's goal for the guys to trust you every time we go out there.''
Tillman (15-4), who had never won more than nine games in a season before this year, allowed two runs and six hits while striking out eight. Only Detroit's Max Scherzer, who has won 19 games, has more major league victories this season.
Jon Lester (12-8) pitched six innings for Boston, allowing three runs and five hits. Daniel Nava had three hits and Shane Victorino finished with two.
The Red Sox remained 2 1/2 games ahead of Tampa Bay in the AL East, with Baltimore another four games back.
Red Sox slugger David Ortiz was hitless in four at-bats to extend his slump to 0 for 22, striking out on four pitches to end the eighth inning with the tying run on third.
''It happens to everybody. I'm a player just like everyone else,'' he said. ''It's not the end of the world. You know what I'm saying? Papi can struggle, too. I'll be back.''
Nava doubled and scored on Stephen Drew's single to give Boston a 1-0 lead in the second inning. But the Orioles took the lead on Machado's double, and then made it 3-1 in the fifth when Lester walked Jones with two outs and Chris Davis doubled off the Green Monster.
NOTES: Victorino's seven homers in August tie his career single-month high, set in July 2008. It's the most homers by a Sox right fielder in a month since J.D. Drew's 12 in June 2008. ... Boston 1B Mike Carp, who had the game-winning hit on Wednesday night, was scratched with a sore left shoulder. ... The Orioles, who closed to 6 1/2 games behind Boston, still have six games left against the Red Sox in September, including the last three games of the season in Baltimore. ... Baltimore OF Nate McLouth was hit in the hand while offering at a pitch in the third inning. He remained in the game and eventually reached on a walk. ... Boston CF Jacoby Ellsbury singled and stole his 50th base of the season in the eighth inning. It's the third 50 stolen base season of his career.