DETROIT (AP) Max Scherzer figured he had squandered another lead when Alex Gordon's fifth-inning drive sailed down the line in right field.
''When that came off the bat, I was sure that thing was gone, and I was stunned when I turned around and realized it had gone foul,'' Scherzer said.
After that reprieve, Scherzer walked Gordon and retired the next two batters to escape a bases-loaded jam, and the Detroit Tigers went on to beat Kansas City 4-2 on Tuesday night to pull within percentage points of the Royals atop the AL Central.
Rajai Davis and J.D. Martinez homered for the Tigers, who can sweep the three-game series with a win Wednesday night.
Scherzer (16-5) allowed a run and seven hits in 6 2-3 innings. Kansas City was down 3-1 in the fifth when Gordon's deep fly to right went just foul with two on. Gordon walked to load the bases with one out, but Salvador Perez lined out and Eric Hosmer struck out.
Joe Nathan worked out of another jam in the ninth to earn his 30th save in 36 chances. He allowed two infield singles to start the inning before closing out the game with two strikeouts sandwiched around a picked-off runner.
Pinch-runner Jarrod Dyson was the man who was picked off second.
''The hardest part about that play was not getting too fired up and throwing the ball away,'' Nathan said. ''We so clearly had him that the only way it was going to get messed up was if I didn't get the ball to (second baseman Ian Kinsler). As it turned out, I didn't even need to make a great throw, but I made a pretty good one anyway.''
Kansas City's Jason Vargas (11-8) allowed four runs and six hits in 5 1-3 innings. He struck out six and walked three.
Scherzer had allowed 14 earned runs over his previous four starts - not terrible, but below his standards as the reigning American League Cy Young Award winner. He's had a hard time protecting leads lately.
On Tuesday, the Tigers led 3-0 in the fifth when Omar Infante hit an RBI single for the Royals - but Scherzer avoided the big inning.
Martinez opened the scoring with a sacrifice fly in the first, and Davis' two-run homer in the second made it 3-0.
Martinez's 20th homer of the season gave Detroit a 4-1 lead in the fifth.
HEAD TO HEAD
The Tigers are trying for their fourth straight AL Central title, and the hallmark of this run has been their ability to beat their closest competitors in the division head to head. Last year, Detroit went 15-4 against Cleveland and finished one game ahead of the Indians.
The Tigers are 11-4 against the Royals this year, and the race is now in a virtual tie. Detroit has one more win and one more loss than Kansas City - and the Royals still have to finish a suspended game in which they trail Cleveland 4-2 in the 10th.
''You have to be conscious of the standings at this time of the year, but being tied for first doesn't mean a thing when we step on the field (Wednesday),'' Tigers manager Brad Ausmus said.
TOO MANY MISTAKES
The normally sure-handed Royals made two errors Tuesday after making two in the series opener. Then there was Dyson's mistake in the ninth, which eliminated a crucial baserunner.
The Royals had men on first and second for the dangerous Gordon, but he struck out. Then Dyson was picked off second. Manager Ned Yost said he was hoping Dyson and fellow pinch-runner Terrance Gore could pull off a double steal.
''Dyson's the lead runner, Dyson's going to find a spot when he can get a jump and go,'' Yost said. ''Gore's the tail runner. He's going to be right behind him.''
The Tigers aren't known for their impressive fielding, but Kinsler made a crucial diving stop to his left on Josh Willingham's grounder in the eighth. The Royals ended up scoring a run that inning, but that was it.
Royals: Yost said he would not have used star closer Greg Holland on Tuesday, but he is close to returning from a triceps injury. ... RHP Liam Hendriks (1-1) is listed as Thursday night's starter against Boston - LHP Danny Duffy is missing that turn in the rotation because of a sore shoulder.
Tigers: Detroit expects RHP Joakim Soria (left oblique strain) to be activated from the disabled list Wednesday.
Kansas City's James Shields (13-7) faces Detroit's Rick Porcello (15-10) on Wednesday, although the possibility of rain puts that game in some doubt. Shields is coming off a 1-0 win over the Yankees in New York on Friday.