Updated

Salvador Perez stroked a go-ahead RBI double in the top of the 12th inning, as the Kansas City Royals kept their playoff hopes alive with a 6-5 win over the Seattle Mariners on Monday in the opener of a three-game series at Kauffman Stadium.

The Mariners seemed poised to end the game in the 10th, as they loaded the bases with one out. Pinch-hitter Endy Chavez followed with a fly out to left fielder Alex Gordon, who made the catch and fired to the plate, where Perez made a diving tag on Kyle Seager tagging from third to keep the game tied.

"I knew there was a chance I was going to have to make that play," Gordon said. "I kind of visualized it before it happened and luckily I have Salvy (Perez) back there who always makes a good play."

Perez then put the Royals in front in the 12th, following a pair of walks with a two-out double into the left-field corner. Gordon scored easily on the play, but Johnny Giavotella was thrown out at the plate to keep the margin at one.

Greg Holland then worked around a pair of walks in the home half of the frame to secure his 45th save of the season, while Wade Davis (8-11) picked up the win after spinning two scoreless innings in relief.

Perez finished with three hits and two RBI for the Royals, who moved within three games of the idle Cleveland Indians for the AL's second wild card spot.

Franklin Gutierrez and Michael Saunders scorched back-to-back homers to tie the game in the eighth for Seattle, which has lost four of its last five.

Lucas Luetge (1-3) was tagged with the loss after giving up Perez's go-ahead double.

"It's definitely a tough loss," Seager said. "We battled, we played hard and we came out on the wrong end of it tonight."

Billy Butler stroked a two-run single in the fourth to get the Royals on the board before Abraham Almonte's RBI infield single in the sixth trimmed Seattle's deficit in half.

The Mariners pulled in front in the seventh, as Justin Smoak worked a one-out walk before being replaced by the pinch-runner Saunders. Mike Zunino followed with a line-drive to center that Jarrod Dyson misplayed, allowing Saunders to score and Zunino to race around to third.

After Dustin Ackley walked, Tim Collins took over on the mound and served up a single to Nick Franklin that scored Zunino to make it 3-2 Seattle.

The Royals regained control in the eighth, as Emilio Bonifacio stepped to the plate with runners on the corners and ripped a one-out single to right to score Alcides Escobar and tie the game.

Eric Hosmer followed with a fielder's choice groundout to score Gordon before Tom Wilhelmsen entered from the bullpen and intentionally walked Butler to get to Perez, who stroked an RBI single to right to make it 5-3.

Seattle answered swiftly in the home half, as Gutierrez and Saunders scorched back-to-back one-out homers to tie the game at 5-5.

Game Notes

Holland tied the Royals single-season saves record held by Dan Quienberry (1983) and Jeff Montgomery (1993) ... Kansas City's Yordano Ventura, making just his second Major League start, struck out six and gave up one run on two hits and three walks over 5 2/3 frames ... Seattle starter Brandon Maurer allowed two runs -- one earned -- on four hits with six strikeouts over seven innings ... The Royals went 4-for-13 with runners in scoring position and left eight men on base ... Gordon recorded his 17th outfield assist of the season.