Sonny Gray saved his best start in five months for the final day of the regular season.
And the 25-year-old pitcher celebrated by leading the Oakland Athletics into the post-season for the third year in a row.
The A's on Sunday secured the American League's second wild-card spot behind Kansas City, officially eliminating Seattle from playoff contention.
The Mariners were victorious, 4-1 over the visiting Los Angeles Angels. Felix Hernandez spun five shutout innings to capture the American League earned-run average title. He lowered his ERA to 2.14 on Sunday, besting Chicago White Sox lefty Chris Sale (2.17).
Gray tossed his second complete-game shutout of the season and second against the Rangers in Texas in Sunday's 4-0 victory.
Athletics players storm the field after securing a playoff spot beating the hometown Texas Rangers 4-0 on Sunday. Oakland will battle Kansas City in a winner-take-all AL wild-card matchup on Tuesday night. (Rick Yeatts/Getty Images)
The right-hander blanked the Rangers on six hits while striking out six. Gray induced 15 groundouts and threw 74 of his 103 pitches for strikes.
"That was a huge," said A's starting pitcher Jon Lester, who has pitched in two World Series for Boston. "That's one of the more impressive games I've gotten to watch in a while."
On April 28 in Texas, he two-hit Texas over nine innings, walking one and fanning six. Gray threw 108 pitches that day, with 73 in the strike zone.
For Gray, who finishes the season with 14 victories and a 3.08 earned-run average, it was his first win in seven starts and just the second victory over the final two months of the season.
Oakland made the last few days interesting, seemingly doing everything it could to keep the Mariners in contention and potentially setting up a tiebreaker for Monday in Seattle.
On Aug. 10, the A's boasted the best record in the majors at 72-44, good for a four-game lead in the AL West Division and 11-game bulge in the wild-card standings. But entering Sunday, Oakland had won only 15 of its previous 45 contests.
"Now the pressure's off, and now we just go out there and play," said Gray.
Lester, who was acquired from Boston ahead of the July 31 non-waiver trade deadline, will start Tuesday's win-or-go-home wild-card game at Kansas City (8:07 p.m. ET) against Royals ace James Shields. Lester won 16 games with a career-low 2.46 ERA this season, including a 6-4 record in 11 starts for the A's. Shields went 14-8 with a 3.21 ERA.
The winner will open a best-of-five American League Division Series against the Los Angeles Angels in Anaheim, Calif.
National League wild card
Canadians Russell Martin and John Axford along with their Pittsburgh Pirates teammates will face Buster Posey and the San Francisco Giants in Wednesday's winner-take-all wild-card contest in Pittsburgh at 8:07 p.m. ET.
The winner will face the NL East champion Washington Nationals in the division series.
American League
The Detroit Tigers clinched the Central Division with a 3-0 win over Minnesota on Sunday.
They will open the post-season in Baltimore on Thursday, with Chris Tillman getting the start for the home side. David Price likely will get the start for the Tigers.
National League
St. Louis, which clinched the Central Division before taking the field in Arizona on Sunday, by virtue of Cincinnati's 4-1 win over Pittsburgh earlier in the day, battles 21-game winner Clayton Kershaw and the Los Angeles Dodgers in Game 1 of the NLDS on Friday in California.