PITTSBURGH — Alex Avila hit an RBI triple in the ninth inning Wednesday night, capping a duel between Jose Quintana and Gerrit Cole, and lifting the Chicago Cubs over the Pittsburgh Pirates, 1-0.

After Cole limited Chicago to two hits over eight innings, Avila scored pinch-runner Leonys Martin from second base with a drive to the right-field corner off reliever Daniel Hudson (2-6).

The only hits against Cole were Javier Baez’s infield single in the second and John Jay’s single in the eighth.

Quintana struck out six but allowed six hits and had to deal with baserunners in each of his six innings.

The Pirates had two men on with no outs in the sixth, but Quintana got Jose Osuna to ground into a double play and a grounder from Sean Rodriguez to end the threat.

REDS 7, BREWERS 1: Rookie Luis Castillo struck out 10 in his final start of the season, Zack Cozart and Jose Peraza homered and last-place Cincinnati completed a three-game sweep at home.

METS 6, PHILLIES 3: Robert Gsellman pitched well in a return from the minors and Travis d’Arnaud homered to help New York win at home in a game shortened to six innings because of rain.

NATIONALS 8, MARLINS 1: Gio Gonzalez and four relievers combined on a six-hitter, and visiting Washington beat Miami for the eighth consecutive time.

AMERICAN LEAGUE

ATHLETICS 3, ANGELS 1: Sean Manaea pitched six-plus innings of shutout ball and Khris Davis homered as host Oakland snapped a season-high eight-game losing streak.

TWINS 10, RAYS 6: Eduardo Escobar had three hits and three RBI, Brian Dozier and Ehire Adrianza both homered, and Minnesota won at Tampa Bay, ending a three-game skid streak and moving into a tie with the Los Angeles Angels for the second AL wild-card spot.

ROYALS 13, TIGERS 2: Salvador Perez homered twice as Kansas City broke open a close game at Detroit.

INTERLEAGUE

RANGERS, BRAVES SPLIT: Elvis Andrus drove in three runs with four hits, including a homer, and Texas won 12-8 at Atlanta.

In the second game, Freddie Freeman hit a two-run double in Atlanta’s five-run second inning against Cole Hamels and the Braves held on for a 5-4 victory.

NOTES

CARDINALS: St. Louis got right-handed reliever Juan Nicasio from Philadelphia for minor league infielder Eliezer Alvarez.