CHICAGO (AP) — Rookie Yermín Mercedes hit a game-ending single, Yasmani Grandal homered twice and the Chicago White Sox beat the Detroit Tigers 9-8 Friday night.

With the victory, Hall of Fame manager Tony La Russa tied John McGraw for second place on baseball’s career wins list with No. 2,763. The 76-year-old La Russa has a long way to go to catch Connie Mack, who won 3,731 games.

The White Sox came out on top after blowing a five-run lead.

Yoán Moncada got hit by a pitch from José Cisnero (0-3) leading off the ninth and moved to third on a single by José Abreu.

Mercedes, in an 0-for-22 skid entering the game, then lined a single to left on a 1-0 pitch. That gave the White Sox their ninth win in 12 games and set off a celebration near first base.

Grandal made it 1-0 with his home run in the second against Spencer Turnbull. Grandal tied it at 8 in the seventh with a solo shot against Bryan Garcia.

Nick Madrigal also homered for the White Sox.

Jonathan Schoop homered twice and matched a career high with four hits. He went deep leading off the sixth and cut it to cut it to 7-6 in the seventh with a three-run drive against Evan Marshall.

White Sox starter Dallas Keuchel threw six innings, allowing two runs — one earned — and five hits.

Liam Hendriks (2-1) came in runners on first and second and two outs in the ninth and retired Niko Goodrum on a fly, preserving the tie.

Turnbull left after the fourth inning because of tightness in his right forearm. The Tigers fell behind 6-1 after committing three errors in a five-run fifth, only to get right back into it.

Eric Haase added a two-run shot to put Detroit ahead 8-7 and cap a six-run outburst.

Turnbull threw just 56 pitches over four innings, allowing one run and two hits. The right-hander struck out four and did not walk a batter. But the Tigers lost to the White Sox for the 13th time in 14 games.