By DAVE HOGG, AP

DETROIT (AP) — Justin Verlander made a teary farewell, accompanied by his 7-year-old daughter as he left a major league mound for the final time in the Detroit Tigers' 4-3 come-from-behind win over the Pittsburgh Pirates on Saturday.

Eduardo Valencia hit a game-ending, two-run homer off Mason Montgomery (6-4) in a three-run ninth that included Kevin McGonigle’s RBI groundout. Valencia became the first Detroit rookie with a walk-off homer while trailing since Lou Whitaker on July 28, 1978, according to Major League Baseball.

Verlander allowed two runs and five hits in 5 1/3 innings with one walk and six strikeouts in his 91-pitch outing. The 43-year-old right-hander was making his second start of the year and first since March 30 in a season derailed by a sore hip and hamstring injury.

After Brandon Lowe hit a foul popup starting the sixth, Tigers manager A.J. Hinch walked from the dugout toward the plate and pointed toward the seats. Genevieve Verlander, wearing a Tigers jersey with her dad’s name and number, sprinted to the mound and hugged her father, who reached down to embrace her and started shaking and sobbing.

Verlander finished 266-159 in 557 starts with a 3.33 ERA and 3,560 strikeouts, eighth on the career list.

Pittsburgh took a 2-0 lead on solo homers by Brandon Lowe in the fourth and Nick Gonzales.

Javier Báez hit an RBI double in the sixth, and Bryan Reynolds extended Pittsburgh's lead to 3-1 with a run-scoring triple in the eighth.

Jacob Waguespack (2-2) pitched 1 1/3 scoreless innings.

Pittsburgh (81-80) needs one win for its first winning season since 2018.

The Pirates' Kirby Yates made his first career start after 517 relief appearances, then said he is retiring. The 39-year-old right-hander allowed two hits over 1 2/3 innings.

Pirates center fielder Oneil Cruz left in the third inning. He fell awkwardly while trying to field McGonigle’s bloop single in the first.

Tigers RHP River Ryan (0-0, 0.00 ERA) and Pirates RHP Jared Jones (5-6, 3.87) start Sunday in the final game before Comerica Park's name changes to Fifth Third Park for 2027.

___

See AP’s full MLB coverage here