TORONTO (AP) — Pinch-runner Breyvic Valera scored the tiebreaking run on a wild pitch in the eighth inning, and the Toronto Blue Jays beat the Chicago White Sox 2-1 on Monday night.

Valera ran for Reese McGuire after the Blue Jays catcher singled off Craig Kimbrel (2-4) to begin the inning. Valera took second on a wild third strike to Bo Bichette, advanced to third on a groundout, and scored when Kimbrel uncorked another wild pitch, this time to Teoscar Hernández.

Tim Mayza (3-1) pitched a perfect eighth inning to earn the win, and Jordan Romano finished for his 12th save in 13 chances.

Toronto spoiled a strong outing by Chicago’s Lance Lynn and handed the White Sox their fourth loss in five games.

The Blue Jays, who came in having lost seven of nine, improved to 9-14 in one-run games.

White Sox shortstop Tim Anderson sat for the third straight game because of soreness in his legs. Anderson could return Tuesday, manager Tony LaRussa said.

Lynn allowed one run and four hits in seven innings, but didn’t figure in the decision for the fifth consecutive start. The right-hander has not won since a road victory at Milwaukee on July 25.

Lynn lowered his ERA to 2.20 and reached the innings threshold he needed to qualify as the AL leader in that category.

The White Sox opened the scoring with three straight singles off Blue Jays right-hander Alek Manoah in the sixth, including an RBI hit by outfielder Andrew Vaughn.

The Blue Jays answered in the bottom half. McGuire led off with a double, but was thrown out trying to advance to third on Bichette’s grounder to second baseman Cèsar Hernández. Bichette advanced on a ground ball and scored when Vladimir Guerrero Jr. hit a game-tying single to center on a 3-0 pitch from Lynn.

Manoah allowed one run and five hits in six innings.