SAN FRANCISCO -- Reliever Jean Machi and the San Francisco Giants took advantage of a huge baserunning blunder by Pittsburgh, tagging out two runners who wandered away on the same play and beating the Pirates 7-5 Wednesday to end a six-game losing streak.
San Francisco stopped a skid that matched its longest of the season, and avoided the club's first winless homestand of at least seven games in the 15-year history of AT&T Park.
The Pirates, who had won three in a row, led 5-4 in the sixth when Chris Stewart drew a one-out walk with runners on second and third.
Machi (6-0) got the ball back from the catcher and noticed Travis Snider had left second base, thinking it was a bases-loaded walk. Machi threw to shortstop Brandon Crawford to trap Snider in a rundown. Crawford tagged out Snider, then threw to Machi to catch Gaby Sanchez in a rundown when he broke home from third. Machi tossed back to third baseman Pablo Sandoval for the tag.
INDIANS 2, MARINERS 0
Kluber (11-6) gave three singles, struck out eight and walked none.
Hernandez gave up four hits in seven innings. He has allowed two runs or fewer and pitched at least seven innings in 14 consecutive starts, a major league record.
Kluber's performance came hours after the Indians traded opening-day starter Justin Masterson to St. Louis.
ROCKIES 6, CUBS 4
Colorado loaded the bases on two walks and Michael McKenry's third hit of the game before Barnes singled with one out against Wesley Wright (0-2). Drew Stubbs then scored on a wild pitch, helping the Rockies stop a three-game slide.
Scahill was recalled from Triple-A Colorado Springs before the game, bolstering Colorado's bullpen after it used eight relievers in Tuesday night's 16-inning loss.
BREWERS 5, RAYS 0
ST. PETERSBURG, Fla. -- Yovani Gallardo gave up four hits in seven innings, Martin Maldonado tied a career high with four RBIs and the NL Central-leading Milwaukee Brewers avoided a three-game sweep by beating David Price and Tampa Bay
Gallardo (6-5) retired 13 in a row at one point.
Price (11-8), the subject of trade speculation heading into Thursday's deadline for non-waiver deals, had his bid to win a team-record seventh consecutive start dashed after allowing four runs and seven hits over seven innings.
ORIOLES 4, ANGELS 3
Garrett Richards (11-4) gave up four runs in seven innings.
ASTROS 8, ATHLETICS 1
Keuchel (10-7) threw his fourth complete game of the season, tying Dodgers ace Clayton Kershaw for the major league lead.
The Astros won the series from the AL West-leading Athletics.
Keuchel struck out five and walked three. Josh Donaldson hit his 23rd homer for Oakland's only run.
TIGERS 7, WHITE SOX 2
Nick Castellanos hit a three-run homer in the first and added an RBI single in the seventh for the Tigers, who snapped a four-game losing streak. Scherzer (13-3) allowed a run and five hits.
BLUE JAYS 6, RED SOX 1
BOSTON -- Mark Buehrle pitched 6 2-3 innings to earn his first win in almost two months and Dioner Navarro had three hits and three RBIs to lead the Toronto Blue Jays over Boston for their fifth consecutive victory.
Buehrle (11-7) allowed one run on six hits to snap a six-game losing streak that matched the longest of his career.
Toronto has won eight of its last nine games.
Lester was originally scheduled to start for Boston, but the All-Star was scratched while his name is bandied about ahead of Thursday's trade deadline. As the Red Sox went down in the ninth, fans remaining from the sellout crowd chanted, "Jonny Lester!"
RANGERS 3, YANKEES 2
Brett Gardner led off the game with a homer for the second straight night, after homering twice in the series-opening loss for New York.
The Rangers had lost seven consecutive series since taking two of three against Minnesota from June 27-29.
Texas went ahead to stay with three runs in the first off Hiroki Kuroda (7-7).
Derek Jeter was 0 for 4 in his final game in Texas, where he was recognized in a pregame ceremony that included an on-field appearance by former President George W. Bush.
NATIONALS 4, MARLINS 3
MIAMI -- Tanner Roark won his fourth consecutive start and Washington averted a series sweep by snapping Miami's six-game winning streak.
For the fourth start in a row, Roark (11-6) allowed one run in seven innings, lowering his ERA to 2.74.
Drew Storen allowed two runs in the ninth before retiring Reid Johnson on a forceout with two on for the final out to earn his first save since August 2013.
Jayson Werth, back in the lineup after missing one start because of a sore right ankle, put the Nationals ahead to stay with a sacrifice fly in their three-run eighth.
Denard Span stole two bases and scored twice.
Brad Hand (2-3) allowed three runs in seven-plus innings. NL RBI leader Giancarlo Stanton hit his 24th home run and Jordany Valdespin hit his second for the Marlins, who had won nine of their past 10.
METS 11, PHILLIES 2
The Mets sent 10 men to the plate in the seventh inning, scoring five insurance runs off the Philadelphia bullpen to take two of three in the series. Lucas Duda homered and had three RBIs.
Wheeler (6-8) gave up two runs and seven hits with four strikeouts in 6 2-3 innings. The 24-year-old right-hander has allowed two runs or fewer in six outings in a row.
Jimmy Rollins, out of the lineup for the noon start after a night game, pinch-hit for Kendrick (5-11) to open the seventh and homered for the second straight day to pull the Phillies within 4-2.
DIAMONDBACKS 5, REDS 4
Goldschmidt's 19th homer off Simon (12-6) gave the Diamondbacks two of three in the series. Simon has gone 0-3 since his first All-Star selection. Didi Gregorius added a two-run homer in the ninth.
The Reds fell to 2-10 since the All-Star break. Devin Mesoraco's three-run homer in the ninth off Addison Reed ended a streak of 11 straight games with three runs or fewer, Cincinnati's longest such stretch of futility since 1967.
Wade Miley (7-7) gave up seven hits and four walks in 6 2-3 innings, improving to 4-1 in his past five starts fpor Arizona. Reed earned his 26th save in 31 chances
ROYALS 3, TWINS 2
Phil Hughes (10-8) took the loss.
Copyright 2014 by The Associated Press
This story is from ESPN.com's automated news wire. Wire index