MILWAUKEE (AP) — Jacob deGrom gave up four hits in eight innings, and the New York Mets beat the Milwaukee Brewers 2-0 on Thursday to stop a seven-game losing streak, their longest since April 2011.

Wilmer Flores hit a go-ahead double off Michael Blazek (4-2) in the sixth for the Mets (37-37), who avoided falling two games below .500 for the first time this year. New York completed a 1-7 trip during which it was outscored 31-11 and hit .177.

DeGrom (8-5) struck out seven and walked none in the eighth straight start in which he has given up two earned runs or fewer. Jeurys Familia pitched a perfect ninth for his 20th save in 22 chances.

New York won for just the fourth time in its last 22 road games. The Mets are 26-11 at Citi Field but 11-26 away from home. Mets manager Terry Collins was ejected in the fourth after Darrell Ceciliani was caught stealing at second.

GIANTS 13, PADRES 8

SAN FRANCISCO (AP) — The San Francisco Giants hit four triples in a game for the first time in 55 years, including a pair by Brandon Belt in a win over the San Diego Padres.

Brandon Crawford and Matt Duffy also tripled for San Francisco, which had not tripled four times in a game since Sept. 15, 1960, when Willie Mays hit three of them and Eddie Bressoud had one at Philadelphia's Connie Mack Stadium.

The Giants had not accomplished the feat at home since Hack Wilson and Ross Youngs had two triples each against the Boston Braves at New York's Polo Grounds on June 28, 1924, according to STATS.

Chris Heston (8-5), who pitched a no-hitter at the New York Mets on June 9, won for the third time in four starts. James Shields (7-2) allowed seven runs — his most since June last year — and nine hits in four-plus innings, his shortest outing this season.

NATIONALS 7, BRAVES 0

WASHINGTON (AP) — Doug Fister allowed four hits over seven innings in another superb outing by a Washington starter, and the Nationals defeated the Atlanta Braves for their sixth straight win.

Washington's rotation has thrown a franchise-record 41 1/3 consecutive scoreless innings over its last six games, the longest streak in the major leagues since Cleveland starters strung together 44 1/3 shutout innings in May 2008.

Fister (3-3) made his second start since a stint on the disabled list caused by right forearm tightness. He struck out four and walked one, and Blake Treinen finished the Nationals' eighth shutout with a two-hit ninth.

Braves right fielder Nick Markakis' streak of 398 games with an error, a record for non-pitchers, ended when he bobbled Denard Span's first-inning single. Matt Wisler (1-1) allowed six runs — four earned — and nine hits in four innings.

ASTROS 4, YANKEES 0

HOUSTON (AP) — Dallas Keuchel pitched a six-hitter and struck out a career-high 12 in his second shutout in less than a month to lead the Houston Astros past the New York Yankees.

Keuchel (9-3) walked one while topping his previous best of 11 strikeouts in a shutout over the White Sox on May 30.

Jose Altuve had three hits and scored three times. Evan Gattis had an RBI single in the sixth and an RBI double in the eighth.

Adam Warren (5-5) allowed three runs and five hits in 5 2/3 innings for the Yankees.

WHITE SOX 8, TIGERS 7, 10 innings

DETROIT (AP) — Carlos Sanchez hit a three-run triple off Joba Chamberlain in the 10th inning, and the Chicago White Sox held on to beat the Detroit Tigers.

With the score 5-all, Chamberlain (0-2) walked Melky Cabrera with one out, hit Avisail Garcia with a pitch and then allowed pinch-hitter J.B. Shuck's two-out infield single to shortstop. Sanchez tripled past first baseman Miguel Cabrera and all the way to the right-field wall on a 1-2 pitch, putting Chicago ahead 8-5.

David Robertson gave up a two-run single to Bryan Holaday with one out in the bottom half, then retired Ian Kinsler on a flyout and, with runners on first and second, intentionally walked Miguel Cabrera to load the bases.

Zach Duke (3-2) pitched a scoreless inning for the win, and Adam Eaton homered for Chicago. Kinsler and J.D. Martinez hit two-run homers for Detroit.

ORIOLES 8, RED SOX 6

BOSTON (AP) — Matt Wieters hit a two-run homer during a six-run fourth inning that carried the Baltimore Orioles over the Boston Red Sox.

J.J. Hardy added a two-run double against rookie left-hander Eduardo Rodriguez (3-2), who lasted just 3 2-3 innings. Steve Pearce had three hits for Baltimore, which took two of three in the series and bounced back after Wednesday's loss to beat Boston for the seventh time in eight games.

Alejandro De Aza hit a three-run homer for the Red Sox.

Miguel Gonzalez (6-4), activated before the game following a stint on the disabled list with a strained right groin, allowed four runs and eight hits in five-plus innings.

ATHLETICS 6, RANGERS 3

ARLINGTON, Texas (AP) — Sonny Gray won his fifth consecutive start at Texas, Josh Reddick drove in three runs and the Oakland Athletics completed a three-game series sweep of the Rangers.

Gray (9-3) struck out seven and walked one over six innings, improving to 5-0 with a 0.96 ERA in his five road starts against the Rangers. Tyler Clippard worked a perfect ninth for his 13th save in 15 chances for Oakland, which has won nine of its past 11 games.

The Rangers have lost five in a row for the first time under new manager Jeff Banister.

Keone Kela (4-5) got the first two outs of the seventh before consecutive singles and giving way to Sam Freeman, who failed to retire any of the three batters he faced.

Mitch Moreland had three hits for Texas, including his ninth homer leading off the fourth and an RBI single the following inning.

DODGERS 4, CUBS 0

CHICAGO (AP) — Jon Lester's winless streak stretched to seven starts when he lasted four innings in his shortest outing in more than three years, and the Los Angeles Dodgers beat the Chicago Cubs for a four-game split.

Signed to a $155 million, six-year contract, Lester (4-6) allowed four runs, four hits and four walks, while striking out five. He is 0-4 with a 4.43 ERA since beating Pittsburgh on May 16.

Carlos Frias (5-5) combined with four relievers on an eight-hitter. Jimmy Rollins had two hits, an RBI and run scored for the NL West-leading Dodgers, who won the final two games of the series.

ROCKIES 6, DIAMONDBACKS 4

DENVER (AP) — Troy Tulowitzki started a five-run eighth inning with his first career pinch-hit home run, and the Colorado Rockies rallied to beat the Arizona Diamondbacks.

Colorado also overcame the loss of its starter, Jorge De La Rosa, because of a small cut on the middle finger of his left (pitching) hand.

The Diamondbacks scored two runs in the ninth and had the tying run at the plate when John Axford struck out Yasmany Tomas for the final out, notching his 13th save. Justin Miller (1-0) got the win in relief.

Tulowitzki drove a 1-0 pitch from Daniel Hudson (2-3) beyond the center-field wall into the Rockies' bullpen for his eighth homer of the season.

CARDINALS 5, MARLINS 1

MIAMI (AP) — Lance Lynn came off the disabled list to pitch six shutout innings in his first outing since June 7, and the St. Louis Cardinals completed a three-game sweep.

Lynn (5-4), who had been sidelined with a strained forearm, allowed only two hits and lowered his ERA to 2.84.

Backup infielder Pete Kozma, who came into the game hitless in his past 21 at-bats, singled three times, scored twice and drove in a run for his second RBI this year. The sweep was the first for the Cardinals in Miami since Aug. 4-7, 2011.

St. Louis (48-24) moved a season-high 24 games above .500, while Miami (30-44) fell a season-worst 14 games under .500.

Miami's Adeiny Hechavarria homered with two outs in the ninth to avert a shutout. Dan Haren (6-5) allowed four runs in six-plus innings.

REDS 5, PIRATES 4, 13 innings

PITTSBURGH (AP) — Brandon Phillips led off the top of the 13th inning with his fourth homer of the season to lift the Cincinnati Reds over the Pittsburgh Pirates.

Phillips, who sat out Wednesday night's game due to a thumb injury, jumped on a fastball from Rob Scahill (2-4), leading the Reds past the Pirates for the seventh time in nine meetings.

Phillips had three of Cincinnati's season-high 17 hits. Todd Frazier added three hits, including a game-tying homer in the seventh. Pedro Villarreal (1-2) worked two scoreless innings for his first major league win.