SEATTLE — Bartolo Colon came within seven outs of a perfect game, giving up a single to Robinson Cano with two outs in the seventh inning, and the New York Mets held off a late rally to beat the Seattle Mariners 3-2 on Wednesday.

SEATTLE — Bartolo Colon came within seven outs of a perfect game, giving up a single to Robinson Cano with two outs in the seventh inning, and the New York Mets held off a late rally to beat the Seattle Mariners 3-2 on Wednesday.

The 41-year-old Colon retired the first 20 batters he faced before Cano lined a 2-2 pitch into left field. Colon (9-8) improved to 13-1 all-time at Safeco Field. Seattle had no answers for the rotund right-hander, who gave up two runs and three hits in 7 1/3 innings.

Taijuan Walker (1-2) walked six and struck out five in his first start in the majors since July 7.

Tigers 11, Diamondbacks 5

At Phoenix, Miguel Cabrera hit a three-run homer, Austin Jackson a three-run double and the Tigers wore out the Diamondbacks in a slugfest.

Detroit roughed up Trevor Cahill (1-7), going up 7-0 after four innings behind Jackson's big hit and three RBIs by Alex Avila.

Rays 3, Cardinals 0

At St. Louis, Alex Cobb struck out 10 and drove in a run with his first major league hit, leading Tampa Bay to its seventh straight win.

Cobb (6-6) blanked the Cardinals on five hits over seven innings. It was the fourth time he has thrown at least seven innings without an earned run this season. Cobb missed 50 games last season with a concussion after he was hit near the right ear by a line drive off the bat of Kansas City's Eric Hosmer.

American League

Athletics 9, Astros 7

At Oakland, Calif., Oakland's Yoenis Cespedes homered twice and tied a career high with five RBIs before leaving with an apparent right thumb injury.

Cespedes hit a three-run homer in the second inning and a two-run shot in the fourth off Brad Peacock (3-7), his 15th and 16th this season.

Twins 3, Indians 1

At Minneapolis, Anthony Swarzak pitched five sharp innings in a fill-in start, Oswaldo Arcia homered and the Twins beat Cleveland.

Danny Santana scored after two of his three hits for the Twins, and five relievers totaled six strikeouts over four scoreless innings. Glen Perkins finished up in the ninth for his 24th save in 27 tries.

Royals 2, White Sox 1

At Chicago, Mike Moustakas scored the tiebreaking run in the top of the ninth inning when White Sox catcher Tyler Flowers couldn't handle a throw home, and Kansas City beat Chicago in the rubber game of a three-game series.

Yankees 2, Rangers 1, 5 inn.

At New York, Brett Gardner hit a tiebreaking homer off All-Star ace Yu Darvish, and New York won the rain-shortened game called in the fifth inning under bizarre circumstances.

David Phelps (5-4) pitched out of a jam just before the storm, and Francisco Cervelli doubled twice to help the Yankees win for the fifth time in six games on a 10-game homestand.

Blue Jays 6, Red Sox 4

At Toronto, Jose Bautista homered and drove in two runs and R.A. Dickey won for the first time in three starts for Toronto.

Bautista hit an RBI double in the first inning and added a leadoff homer in the seventh, his first since July 2.

Angels 3, Orioles 2

At Anaheim, Calif., Kole Calhoun drew a bases-loaded walk from reliever Brian Matusz in the eighth inning after a tying RBI double by Erick Aybar for Los Angeles.

Jered Weaver (11-6) allowed two runs and six hits through eight innings, striking out six and walking none before the Angels recorded their major league-best 31st come-from-behind win.

National League

Giants 3, Phillies 1

At Philadelphia, Hunter Pence drove in all of San Francisco's runs with a double in the ninth and Madison Bumgarner pitched eight scoreless innings.

Bumgarner (12-7) gave up five hits while striking out six and walking none in a pitchers' duel with A.J. Burnett.

It was the sixth win in seven games for first-place San Francisco, which moved two games ahead of Los Angeles in the NL West.

One night after blowing just his third save in 26 chances, closer Jonathan Papelbon (2-2) took the loss.

The Phillies managed just seven hits. They lost their fourth straight and seventh of eight.

Pence broke a scoreless tie with a softly hit blooper down the right-field line off Papelbon on a full count with two outs.

Pirates 6, Dodgers 1

At Pittsburgh, Josh Harrison had two hits with two RBIs and Pittsburgh jumped on Dan Haren early in the win.

Harrison's two-run double capped a four-run outburst in the first against Haren (8-8). Pittsburgh has won five of six since the All-Star break to move a season-high seven games over .500 (54-47).

Padres 8, Cubs 3

At Chicago, Tommy Medica hit a go-ahead RBI double in the fifth inning and Ian Kennedy pitched six strong innings for San Diego.

Kennedy (8-9) won his third straight decision. He allowed three runs and three hits, while striking out six and pitching around a season-high five walks. He worked out of a bases loaded jam in the fifth inning.

Rockies 6, Nationals 4

At Denver, Jorge De La Rosa struck out a season-high 11 as he pitched efficiently into the eighth inning and the wobbly Colorado bullpen held off Washington's late rally, helping the Rockies snap a seven-game.

Braves 6, Marlins 1

At Atlanta, Freddie Freeman hit a three-run homer and Ervin Santana won his second straight start for Atlanta.

Freeman, an All-Star first baseman, broke out of a slump in the season series against the Marlins, ending a 2-for-44 stretch by hitting his 14th homer as the Braves took a 5-0 lead in the four-run third inning.

Brewers 5, Reds 1

At Milwaukee, Mark Reynolds homered twice and the Brewers completed a three-game sweep of the Reds.

Kyle Lohse pitched 6 2/3 innings to hand the Reds their sixth straight loss since the All-Star break.