ST. LOUIS (AP) — The St. Louis Cardinals maintained their lead in the National League standings with a 4-1 win over Philadelphia on Tuesday, with Shelby Miller's six scoreless innings guiding the hosts to victory.

Allen Craig drove in a pair of runs for the Cardinals, who maintained a 1-1/2 game lead in the NL from Central division rival Pittsburgh, which beat Washington.

Elsewhere, Boston stayed atop the American League standings by beating its nearest rival Tampa Bay, while the New York Yankees staged a ninth-inning rally to edge Texas.

Baltimore slipped back in the tight AL East contest by losing at Kansas City, San Francisco earned a split of its double-header against Cincinnati, and New York's fill-in starter Carlos Torres impressed as the Mets beat Atlanta.

St. Louis' Miller (10-6) gave up only one walk with six strikeouts to become the third Cardinals starter to reach 10 wins this season after Adam Wainwright (13-5) and Lance Lynn (11-5).

The Phillies lost a third straight game, missing opportunities to make up ground on Atlanta in the NL East.

Boston's Jon Lester matched his season high with eight strikeouts, guiding the Red Sox to a 6-2 win over Tampa Bay, knowing a loss would have cost them the AL lead.

Lester (9-6) gave up two runs with no walks in 6 1-3 innings.

The Red Sox moved 1½ games ahead of the Rays in the East and stayed atop the division for the 58th consecutive day.

The loss was only the third for Tampa Bay in its past 21 games.

New York's Eduardo Nunez hit a tying triple and Brent Lillibridge followed with a go-ahead single in the ninth inning to lift the Yankees to a 5-4 win over Texas.

The Yankees' comeback got started when Vernon Wells drew a one-out walk against Joe Nathan (1-1), who had converted 15 consecutive save chances. Texas had been 51-0 when leading after eight innings.

Veteran New York closer Mariano Rivera struck out two in a perfect ninth for his 32nd save, extending his career record to 640.

Texas remained three games behind Oakland for the AL West lead.

Pittsburgh's Gerrit Cole pitched seven strong innings to end a personal three-game losing skid and added an RBI single to lead the Pirates to a 5-1 win over Washington.

Cole (5-3) turned in the best outing of his young career, allowing two hits in his eighth career start to help Pittsburgh to a third-straight win.

The Nationals have lost 10 of their past 12.

Kansas City's Bruce Chen tossed six strong innings to help the Royals beat Baltimore 3-2 and end the Orioles' run of five successive wins.

Chen (4-0), making his second start since replacing Luis Mendoza in the rotation, limited the Orioles to one run, retiring his final 10 batters.

Royals closer Greg Holland, who earned his 25th save in 27 chances, gave up a leadoff single in the ninth then an RBI triple but preserved the win with a strike out and successive grounders.

San Francisco's Pablo Sandoval hit a two-run double to give the Giants a 5-3 win in the second game of a double-header against Cincinnati, delivering Bruce Bochy his 1,500th win as a manager.

The night game was San Francisco's first win in six tries against the Reds this season after being outscored 34-6 in the first five meetings — including 11-0 on Monday night and 9-3 in Tuesday's day game.

The double-header made up for a July 4 washout in Cincinnati, so although the Reds were the visiting team, they batted last and wore home uniforms.

New York's Carlos Torres pitched six strong innings and drove in a run to steer the Mets to a 4-1 win over Atlanta.

Torres (1-1) gave up a homer on the second pitch of the game but steadied in only his second start of the season, pitching out of trouble in the first four innings.

Ike Davis had a go-ahead double in a three-run sixth inning for the Mets.

Seattle's Kyle Seager had three hits as the Mariners notched their eighth-straight win by edging Cleveland 4-3.

Los Angeles' Adrian Gonzalez hit a three-run homer to power the Dodgers to a 10-9 win over Toronto, and a fifth-straight victory.

Arizona's A.J. Pollock doubled, tripled and drove in three runs to help the Diamondbacks to a 10-4 win over the Chicago Cubs.

Detroit's Rick Porcello pitched seven scoreless innings to guide the Tigers past the Chicago White Sox 6-2.

Houston's Jonathan Villar scored the winning run from second base in the ninth inning on a throwing error by Oakland's catcher Derek Norris, giving the Astros a 5-4 comeback win over Oakland.

Minnesota's Chris Herrmann, making an emergency start behind the plate for expectant father Joe Mauer, hit his first career grand slam in a seven-run 10th inning that lifted the Twins to a 10-3 win over the Los Angeles Angels.

San Diego's Nick Hundley and Will Venable each homered as the Padres defeated Milwaukee 6-2.

Miami rookie Jose Fernandez tossed seven strong innings to guide the Marlins to a 4-2 win at Colorado.

.