UNDATED (AP) — Pencil the Pittsburgh Pirates in for baseball's postseason dance.

Gerrit Cole retired the final 17 hitters he faced, and the surging Pirates clinched a spot in the playoffs with a 3-2 win over the free-falling Atlanta Braves. The Pirates' win combined with Milwaukee's 3-1 loss to Cincinnati assured Pittsburgh of no worse than an NL wild card. The Pirates wrapped up their berth exactly one year after clinching a place in the 2013 playoffs.

The Pirates, still in the hunt for the NL Central title, have won 11 of 13.

The Bucs reacted to the final out with little emotion. The Pirates exchanged high-fives in a line on the field before sharing hugs in front of their dugout.

The Pirates still could be NL Central champions. They moved within a game and a-half of St. Louis. The Chicago Cubs played spoiler against their arch-rivals by knocking off the Cardinals 4-3 in 10 innings. Wellington Castillo's (kahs-STEE'-yohz) line-drive single in the 10th drove in Anthony Rizzo with the winning run off reliever Pat Neshek (NEE'-shahk). Castillo also homered.

Elsewhere in the majors:

— The Dodgers have dropped their magic number to one for clinching the NL West after Justin Turner hit a pair of solo homers and Matt Kemp added a two-run shot in a 4-2 win over second-place San Francisco. Zack Greinke (GREHN'-kee) added two runs and six hits in eight innings as Los Angeles dropped the Giants one game behind the Pirates for the first wild-card slot. San Francisco also failed to clinch a playoff berth.

— Johnny Cueto (KWAY'-toh) kept his hopes of a 20-win season alive, and Todd Frazier and Devin Mesoraco hit back-to-back homers in the Cincinnati Reds' 3-1 victory over Milwaukee. Cueto is 19-9 with one more start scheduled Sunday against Pittsburgh.

— The Angels managed to turn just three hits into a 2-0 victory at Oakland as Wade LeBlanc combined with four relievers to blank the Athletics. Erick Aybar (EYE'-bahr) scored the opening run during a rundown between first and second before Gordon Beckham homered. The outcome leaves the A's tied with the Royals for the AL's two wild-card berths.

— NL East champion Washington beat the New York Mets for the 14th time in 17 meetings, 4-2 as Tanner Roark (ROH'-ark) won his 15th game. Adam LaRoche clubbed his 26th homer, a three-run shot. New Nats closer Drew Storan earned his 10th save, including nine in a row. The Nats have won 13 of their last 16 overall.

— Detroit blew a 3-0 lead in the ninth before Miguel Cabrera's RBI single in the bottom half lifted the Tigers to a key 4-3 victory over the Chicago White Sox. The victory keeps the Tigers a game up on Kansas City in the AL Central race.

— Rookie Yordano Ventura blanked Cleveland's punchless offense for seven innings as the Royals kept pressure on first-place Detroit in the AL Central with a 7-1 win over the Indians. Ventura is 14-10.

— Nelson Cruz hit his major league-leading 40th home run and the Baltimore Orioles pushed Derek Jeter and the Yankees to the brink of playoff elimination by beating New York 5-4. The Yanks are five games behind for the second AL wild card with five games left.

— Dalton Pompey hit his first major league homer and the Toronto Blue Jays roughed up Seattle ace Felix Hernandez for a career worst-tying eight earned runs in a 10-2 rout that dented the Mariners' wild card hopes. The Mariners are three games off the AL wild-card pace with five games to play.

— Ben Zobrist had three hits and drove in Tampa Bay's first two runs during an eighth inning rally in the Rays' 6-2 win over Boston.

— Henderson Alvarez outdueled Cole Hamels and the Miami Marlins beat the Philadelphia Phillies 2-0. Alvarez is 12-6.

— Kyle Gibson matched a career high with eight strikeouts as Minnesota doubled up Arizona 6-3.

— Robinson Chirinos homered to lead the Texas Rangers to a 2-1 victory over Houston.

— Drew Stubbs hit a tiebreaking solo homer in the eighth inning to push Colorado past San Diego 3-2.

UNDATED (AP) — General manager Sandy Alderson and the New York Mets have completed a contract extension that runs through 2017.

Mets chief operating officer Jeff Wilpon says the team has exercised Alderson's option for next season and added two years to his deal. Alderson confirmed that manager Terry Collins will return next year. Collins is under contract through next season, with an option for 2016.

With one more loss, New York will suffer its sixth consecutive losing season since moving into Citi Field.

In other baseball news:

— San Francisco Giants outfielder Angel Pagan will have season-ending surgery Thursday to repair a bulging disk in his back. Recovery is expected to take about three months, so Pagan would not be available if the Giants reach the postseason.

— Looks as though there might be rain when Derek Jeter ends his reign in the Bronx. The retiring New York captain is scheduled to play his final game at Yankee Stadium on Thursday night against Baltimore and the National Weather Service says there's a 70 percent chance of showers during the day, tapering off to 20 percent at night.

More From KOWB 1290