PITTSBURGH (AP) — Vance Worley pitched eight sparkling innings, Russell Martin hit a late RBI single and the Pittsburgh Pirates trapped a runner in the ninth to edge Milwaukee 1-0 in Major League Baseball on Sunday, extending their wild-card lead over the Brewers.

The Pirates tied San Francisco atop the National League wild-race race, 4 1/2 games ahead of Milwaukee.

Carlos Gomez led off the Milwaukee ninth with a single and Rickie Weeks followed with an infield hit, but Gomez got caught in a rundown and was tagged between second and third.

The Kansas City Royals also increased their lead in the American League wild-card race with a 5-2 win over the Detroit Tigers.

The Royals avoided a three-game sweep and moved within 1 1/2 games of the AL Central-leading Tigers. Kansas City also opened a 1 1/2-game edge over Seattle for the second wild-card spot.

Aoki's tiebreaking triple in the fourth scored Omar Infante and Mike Moustakas, making it 4-2 and chasing Rick Porcello from the game.

In other games, Seattle's playoff hopes took another hit with an 8-3 loss to Houston, St. Louis clinched a playoff spot before falling to Cincinnati 7-2, and San Francisco fell further behind the Dodgers in the NL West with an 8-2 loss to San Diego.

Jake Marisnick hit a three-run homer for the second straight game to lead Houston to victory over Seattle.

Houston took two of three from the Mariners, dropping them 1 1/2 games behind Kansas City for the second AL wild card.

St. Louis secured its fourth consecutive postseason appearance when Milwaukee lost to Pittsburgh, but the Cardinals' lead in the NL Central was sliced to 2 1/2 games over the Pirates.

Bruce hit two of Cincinnati's four homers as the Reds ended a six-game losing streak. Todd Frazier and Devin Mesoraco also went deep.

Reeling San Francisco managed just six hits off Ian Kennedy and three Padres relievers, falling 4 1/2 games behind the Dodgers.

The Giants are still in good shape for a wild-card berth — they're tied with Pittsburgh, 4 1/2 games ahead of Milwaukee.

Kennedy (12-13) struck out five, giving him a career-high 201.

The Dodgers clinched a playoff berth on Friday but didn't let up with an 8-5 win over the Chicago Cubs.

Matt Kemp homered and drove in four runs and Yasiel Puig scored a career-high four times for the Dodgers.

The Oakland Athletics, meanwhile, topped Philadelphia 8-6 in 10 innings to maintain their half-game lead over Kansas City and two-game lead over Seattle in the AL wild-card race.

Josh Donaldson hit a two-run homer in the 10th inning for the A's.

Cleveland didn't lose any ground in its playoff chase with a 7-2 win over Minnesota.

Corey Kluber matched a career best by striking out 14 for the second straight start for the Indians, who have won five of six.

Cleveland is 3 1/2 games behind Kansas City for the second AL wild card, and hosts the Royals for three-plus games beginning Monday.

Elsewhere in the league, Texas' Ryan Rua hit his first major league homer as the Rangers beat the playoff-bound Los Angeles Angels 2-1 for their eighth win in nine games.

In Baltimore, Joe Kelly pitched seven innings of three-hit ball and the Red Sox got home runs from Mookie Betts and David Ross to beat the AL East-champion Orioles 3-2.

New York's retiring Derek Jeter got two more hits on his final homestand and Masahiro Tanaka made a triumphant return from an elbow injury that sidelined him for 2 1/2 months in the Yankees' 5-2 win over Toronto.

The Chicago White Sox topped Tampa Bay 10-5, Washington beat Miami 2-1, Colorado defeated Arizona 8-3, and the New York Mets knocked Atlanta out of the playoff race with a 10-2 win.