O's edge Red Sox, 3-2, to avoid series sweep
Tillman (15-4) allowed two runs on six hits and struck out eight to lower his ERA to 2.93 in 12 road starts. Tommy Hunter and Brian Matusz combined to work the eighth inning and Jim Johnson worked around a lead-off infield single from Daniel Nava in the ninth for his 41st save.
The Red Sox took a 1-0 lead on Stephen Drew's RBI single in the second, but Machado laced his major league-leading 45th double off the Green Monster in the third for a 2-1 advantage.
Chris Davis added an RBI double off the towering wall in left in the fifth.
The Red Sox lead the American League East by 2 1/2 games over Tampa Bay, while Baltimore moved within 6 1/2 games of Boston in the division and 3 1/2 back of Oakland for the second wild card.
Shane Victorino's solo homer in the sixth - his third of the series and fourth in as many games - pulled Boston within 3-2.
Matusz, however, struck out David Ortiz to strand the tying run at third in the eighth and Johnson rebounded in the ninth to induce a double play from Jonny Gomes and strike out Jarrod Saltalamacchia.
Tillman outdueled Jon Lester (12-8), who surrendered three runs on five hits over six innings with four strikeouts and three walks. The left-hander dropped to 15-3 all-time against Baltimore.
GAME NOTEBOOK: Machado has 49 multi-hit games, tied with Boston 2B Dustin Pedroia for the third-most in the AL. ... Ortiz went 0-for-4 and is hitless in his last 22 at-bats. The slugger's last hit came on Aug. 18. ... Boston CF Jacoby Ellsbury recorded his 50th stolen base in the eighth, making him the 24th player since 1900 with at least three seasons of 50 or more.