Lester (13-8) lowered his ERA to 1.71 in his past six starts. He allowed one earned run and eight hits with a season-high nine strikeouts and no walks.
Scherzer (19-2), who won his first 13 decisions, lost for the first time since July 13 when Texas beat him 7-1.
Roger Clemens is the only pitcher to start 20-1. He ended up 20-3 with the Yankees in 2001.
Boston scored on Will Middlebrooks' two-run single in the fifth. Detroit's Jose Iglesias doubled in a run in the second in the matchup of division leaders.
Koji Uehara pitched the ninth for his 17th save in 20 opportunities and extended his scoreless streak to 25 innings.
Miguel Cabrera, who missed three games with abdominal and groin problems, returned for Detroit and went 0 for 4.
Yankees 6, White Sox 4
NEW YORK (AP) — Eduardo Nunez's two-run double capped a five-run eighth inning for New York.
Pinch-hitter Curtis Granderson tied the score with an RBI single off reliever Donnie Veal and New York went on to win for the 12th time in 14 home games.
Alexei Ramirez hit a two-run triple and Alejandro De Aza homered for the last-place White Sox who dropped their fifth straight.
Alfonso Soriano's two-run single off Nate Jones (4-5) cut the deficit to 4-3.
Boone Logan (5-2) pitched a perfect eighth, and Mariano Rivera earned his 40th save.
Derek Jeter finished with two hits, giving him 3,315 to pass Eddie Collins (3,313) for ninth on the career list.
Indians 4, Orioles 3
CLEVELAND (AP) — Ubaldo Jimenez pitched six shutout innings while Yan Gomes and Asdrubal Cabrera drove in two runs apiece, and Cleveland survived a shaky ninth inning.
Jimenez (10-9) has allowed three earned runs or less in eight consecutive starts. The right-hander allowed four hits.
Gomes' two-run double was the key hit in Cleveland's sixth. Cabrera had sacrifices flies in the fourth and sixth.
Orioles starter Chris Tillman (15-5) allowed four runs in 5 1-3 innings. The right-hander has one win in his last six starts.
The Orioles got back in the game in the ninth against Indians closer Chris Perez, who pitched in a non-save situation. Nate McLouth hit a three-run homer but Perez struck out Brian Roberts and Manny Machado before retiring Chris Davis, who leads the majors with 47 homers, on a ground ball.
Royals 4, Mariners 3
KANSAS CITY, Mo. (AP) — Salvador Perez drove in Mike Moustakas with two outs in the eighth inning for Kansas City, which survived after blowing a three-run lead.
Billy Butler grounded into a double play against reliever Yoervis Medina (4-4) when Moustakas legged out a double to centre in the eighth. Perez followed with a single to left, and Moustakas had just enough time for a headfirst slide ahead of Endy Chavez's throw to home.
Luke Hochevar (4-2) got two outs in the eighth to leave runners stranded on second and third, and Greg Holland pitched a perfect ninth for his 31st straight save and 38th on the year.
Perez homered and finished with three hits for the Royals, who have won three straight and eight of their last 10. Alex Gordon also hit a solo shot and Butler drove in a run for Kansas City.
Kyle Seager hit a two-run shot for the Mariners, who have lost three straight.
Twins 9, Astros 6, 12 innings
HOUSTON (AP) — Clete Thomas scored the go-ahead run on a wild pitch in the 12th inning and Darin Mastroianni added a two-run double for Minnesota.
Thomas reached on a fielder's choice and went to third on Josmil Pinto's double. Kevin Chapman (0-1) then uncorked a wild pitch with pinch-hitter Ryan Doumit at the plate.
Mastroianni provided a couple of insurance runs when he doubled with two outs as Minnesota recovered after Glen Perkins blew a save opportunity in the ninth.
Brian Dozier and Trevor Plouffe homered for Minnesota, which has won three straight. Plouffe had four hits and Mastroianni went 3 for 6 with three RBIs.
Brandon Barnes had three hits and five RBIs for the Astros, including a tying three-run homer off Perkins with two outs in the ninth.
Caleb Thielbar (3-2) pitched two hitless innings for the win and Josh Roenicke finished for his first save.
Rays 7, Angels 1
ANAHEIM, Calif. (AP) — Matt Moore pitched into the sixth inning in his return from the disabled list, and Tampa Bay got home runs from Desmond Jennings and Yunel Escobar.
Moore (15-3) won his seventh straight decision, yielding an unearned run and four hits in 5 1-3 innings as the Rays snapped a five-game losing streak. The All-Star left-hander, who missed the entire month of August because of elbow soreness, won six straight starts before getting a no-decision on July 28 at Yankee Stadium.
Roberto Hernandez struck out his first five batters after relieving Moore, and seven altogether in 3 2-3 perfect innings to record his first save in eight major league seasons. It was only his second relief outing since his rookie season with Cleveland in 2006.
Los Angeles left-hander Jason Vargas (8-6) was charged with five runs and 10 hits in four-plus innings.
Rangers 5, Athletics 1
OAKLAND, Calif. (AP) — Martin Perez allowed one run over seven innings to win his sixth straight start and Mitch Moreland homered to move Texas back into sole possession of first place in the AL West.
After falling into a tie for first with the A's when they lost the series opener, the Rangers bounced back behind another strong performance from Perez (9-3) and are assured of leaving Oakland for the final time in the regular season with at least a share of the division lead.
Bartolo Colon (14-6) allowed three unearned runs in the fifth inning following his own error. Colon is winless in five starts since July 26 with a DL stint in the middle of that stretch.
The Rangers scored three unearned runs in the fifth to take a 4-1 lead with help from two comebackers that Colon could not handle. Adrian Beltre added a run-scoring groundout and A.J. Pierzynski blooped an RBI single.
Alex Rios added a leadoff homer in the eighth to make it 5-1.Suggest a correction