DETROIT -- Max Scherzer struck out a season-high 14 batters and collected his American League-leading 14th victory as the Detroit Tigers beat the Pittsburgh Pirates 5-2 on Thursday.

Scherzer (14-4) out-dueled Francisco Liriano while coming up one strikeout shy of his career high. Scherzer, who has struck out 10 or more batters six times this season and 24 times in his career, didn't give up a run on three hits in eight innings.

J.D. Martinez drove in Detroit's first two runs with a solo home run and a bases-loaded walk. Nick Castellanos added a two-run single for the Tigers, who have won two straight following a four-game losing streak

Pinch hitter Gaby Sanchez hit a two-run homer off reliever Phil Coke in the ninth for the Pirates.

Liriano (3-9) allowed two runs and three hits in six innings while recording nine strikeouts.