HOUSTON — David Freese hit a go-ahead two-run double in a three-run eighth inning to help the Los Angeles Angels rally for a 6-5 win over the Houston Astros on Wednesday to close in on the second AL wild-card spot.

Houston’s wild-card lead over Los Angeles fell to 1 1/2 games.

In the eighth, Mike Trout hit a leadoff double off Will Harris (5-5) before David Murphy drew a walk with one out and Harris was replaced by Pat Neshek.

Freese’s double sailed just beyond left fielder Colby Rasmus on the warning track and made it 5-4. Carlos Perez’s RBI single made it 6-4 and chased Neshek.

Trevor Gott (3-2) induced the last two outs of the seventh for the win.

George Springer had three RBI for the Astros, who are heading into a pivotal weekend series with Texas.

BLUE JAYS 4, YANKEES 0: Russell Martin hit a three-run homer, Marcus Stroman (3-0) pitched seven strong innings to win his third straight start and Toronto won at home to extend its AL East lead to 3 1/2 games.

Martin connected off Andrew Bailey in the seventh, matching his career high for homers with 21, as Toronto took 2 of 3 from New York in a showdown between the division’s top teams.

Starting in place of Masahiro Tanaka (right hamstring), New York right-hander Ivan Nova (6-9) took the mound for the first time since allowing six runs in 1 2/3 innings of a Sept. 12 loss to Toronto.

Nova, who had allowed at least three earned runs in each of his previous seven outings, kept the Blue Jays scoreless through five before departing after a two-out walk to Martin in the sixth.

TIGERS 7, WHITE SOX 4: Justin Verlander hit 99 mph in working out of a bases-loaded jam during his final inning, and Victor Martinez hit his 200th career home run as Detroit won at home.

Verlander (4-8) threw five straight 98-99 mph fastballs in striking out Geovany Soto to end the seventh inning and exited with a four-run lead. He allowed three runs on five hits with eight strikeouts.

NATIONAL LEAGUE

BRAVES 6, METS 3: Freddie Freeman broke a ninth-inning tie with a three-run homer after driving in two as a pinch hitter in the seventh as Atlanta stunned the Mets in the finale of New York’s rough homestand.

New York stayed 6 1/2 games in front of second-place Washington, whose 4-3 loss to Baltimore trimmed the Mets’ magic number to five for clinching the division title.

BREWERS 4, CUBS 1: Zach Davies allowed two hits over six innings and Martin Maldonado drove in two runs to lead Milwaukee to a win at Chicago.

Jorge Soler homered for the Cubs, who lost for the second time in nine games and finished with three hits total.

MARLINS 4, PHILLIES 3: Dee Gordon’s RBI double with two outs in the bottom of the 11th inning lifted Miami to a win at home.

INTERLEAGUE

ORIOLES 4, NATIONALS 3: Manny Machado hit a two-run homer off Max Scherzer with two outs in the seventh inning and Baltimore rallied to win at Washington.

Steve Pearce had a two-run homer and a double for the Orioles, who moved within four games of the final AL wild-card spot.

Washington remains 6 1/2 games behind NL-East leading New York, which lost to Atlanta.

J.J. Hardy led off the seventh with a double against Scherzer (12-12), but after Clint Robinson robbed Gerardo Parra with a diving stop at first, the Washington starter had a chance to get out of it.

Machado worked the count to 2-2 before lining Scherzer’s season-high 122nd and final pitch into the seats in left-center for his 30th homer.