SEATTLE -- The Kansas City Royals used more extra-inning heroics to keep their slim postseason hopes alive late Monday night.
Catcher Salvador Perez delivered a two-out, RBI double in the top of the 12th inning, and the Royals beat the Seattle Mariners 6-5.
Kansas City (83-73) won its second extra-inning game in as many days to move within three games of the idle Cleveland Indians (86-70) in the race for the second American League wild-card spot. The Texas Rangers (85-71) are one game behind the Indians in the wild-card standings.
"Every win from now to the last game of the season is important to us," Perez said. "We just need to win. We can't control what the other teams do."
Kansas City closer Greg Holland came on in the bottom of the 12th and pitched around two walks to earn his 45th save of the season, tying the franchise record established by Dan Quisenberry in 1983 and matched by Jeff Montgomery in 1993.
Perez came through in the top of the 12th, driving in Alex Gordon from second base after the same duo helped Kansas City narrowly avoid a 6-5 loss two innings earlier.
Gordon's throw to Perez from left field in the bottom of the 10th inning barely beat baserunner Kyle Seager at the plate for the final out.
With the bases loaded in the 10th, Gordon caught a fly ball from Seattle's Endy Chavez for the second out of the inning, then threw out Seager at home plate to preserve a 5-5 tie. Perez fielded the throw just to the right of home plate and made a sweeping tag that barely caught Seager just above his elbow.
"It was a good slide. I just put my glove on the plate, and he touched my glove," Perez said. "A good play by Alex Gordon."
In the 12th, with the score still 5-5 and runners on first and second, Perez came to the plate with two outs. He doubled into the left field corner, easily scoring Gordon from second before Kansas City's Johnny Giavotella was thrown out at home to keep the Mariners within 6-5.
"This team's been resilient all year, and people are starting to see that now," Holland said after the four-hour, 12-minute marathon. "We make one great defensive play after another, get clutch hits. ... That's the way it's been all year."
Mariners reliever Lucas Luetge (1-3) suffered the loss on a night when Seattle used seven pitchers. The Mariners (68-89) fell to 6-15 in extra-inning games.
"We've been so close, so many times," manager Eric Wedge said.
Kansas City reliever Wade Davis (8-11) earned the win long after rookie Yordano Ventura turned in another stellar start with little to show for it. Ventura allowed two hits and one run over 5 2/3 innings, and he left the game with a 2-1 lead.
Both teams rallied from deficits in the late innings in a game that saw Kansas City clinging to a 2-1 lead heading into the bottom of the seventh.
Back-to-back solo homers from Seattle's Franklin Gutierrez and Michael Saunders in the bottom of the eighth tied the score 5-5.
A three-base error charged to Kansas City center fielder Jarrod Dyson allowed Saunders to score the tying run from first base in the seventh inning. The Mariners' Nick Franklin then drove in the go-ahead run with an RBI single for a 3-2 lead.
Kansas City responded with a three-run eighth that was made possible by an error. A potential inning-ending double play came up short when second baseman Nick Franklin's throw to first bounced short of its target. Instead of getting out of the inning with the score tied 3-3, Seattle saw two more runs score as Kansas City pulled ahead 5-3.
Seattle starter Brandon Maurer turned in one of his best performances of the season, allowing two runs (one earned) on four hits over seven innings.
"Maurer took the next step today," Wedge said.
Left-hander Charlie Furbush replaced Maurer to open the eighth, and he allowed three runs on three hits in two-thirds of an inning.
NOTES: Kansas City manager Ned Yost said RHP James Shields is not expected to miss a start despite the bruised right elbow he suffered Sunday. Shields took a line drive from Texas Rangers OF David Murphy off his elbow in the third inning but did not come out. Yost said before Monday's game that Shields is "a little bruised, a little sore, (but) he's fine." Shields' next scheduled start is Friday against the Chicago White Sox. ... Before Monday's game, the Mariners held a moment of silence to recognize the passing of team owner Hiroshi Yamauchi, who died last week at the age of 85. Monday marked Seattle's first home game since Yamauchi's death. ... Monday's official attendance was 12,790, marking the fourth consecutive meeting between the two teams played in front of fewer than 15,000 fans. The previous three were in Kansas City earlier this month.