NEW YORK YANKEES starting pitcher Sonny Gray, left, leaves the mound as he is relieved during the third inning of a baseball game against the Baltimore Orioles on Wednesday in New York. THE ASSOCIATED PRESS

NEW YORK YANKEES starting pitcher Sonny Gray, left, leaves the mound as he is relieved during the third inning of a baseball game against the Baltimore Orioles on Wednesday in New York. THE ASSOCIATED PRESS

NEW YORK

Sonny Gray was chased in the third inning by the team with worst record in the majors, big league-loss leader Alex Cobb ended a nine-start winless streak and the Baltimore Orioles beat the New York Yankees 7-5 on Wednesday.

Despite what appeared to be a mid-game lecture in the dugout by third base coach Phil Nevin during a rain delay, New York (68-38) dropped 5 1/2 games behind Boston (75-34) heading into a four-game series at Fenway Park starting Thursday.

Gray (8-8) allowed seven runs, eight hits, and two walks in 2 2/3 innings, raising his ERA to 5.56. He was booed as he walked off the mound and was replaced by Lance Lynn.

Cobb (3-14) had been 0-7 since winning at the New York Mets on June 5, losing his last five outings. He breezed against the Yankees with an early 7-1 lead, allowing one run and seven hits in six innings and stopping Baltimore’s streak of 11 consecutive road losses.

Gleyber Torres homered twice for New York, a solo drive in the second and a three-run shot in the ninth.

Astros 8, Mariners 3

SEATTLE (AP) — Marwin Gonzalez hit two of Houston’s four home runs, and the Astros knocked Seattle Mariners from the lead for the second wild card in the American League.

After a five-game losing streak, the Astros rebounded to win the final two games of the series. Houston has a five-game cushion over Seattle in the AL West and dropped the Mariners into a tie with surging Oakland for the second AL wild-card spot. Seattle led the A’s by 11 games in the middle of June, but has seen the entire lead disappear over the past six weeks.

Gonzalez hit a solo home run off Wade LeBlanc (6-2) with two outs in the second inning and added a two-run shot in the fourth. Jake Marisnick, recalled from the minors before the game, added a two-run shot off LeBlanc and Max Stassi greeted reliever Nick Vincent with a three-run homer in the fifth.

Dallas Keuchel (9-9) improved to 6-1 in his past nine starts, throwing seven innings.

Cubs 9, Pirates 2

PITTSBURGH (AP) — Cole Hamels had little trouble in his return to the National League, keeping Pittsburgh in check over five innings to lead Chicago.

Hamels (6-9), acquired in a trade with Texas last week, gave up one unearned run on three hits. The four-time All-Star struck out nine and walked two to pick up his first win for a National League team in more than three years.

Nationals 5, Mets 3

WASHINGTON (AP) — Tommy Milone worked seven strong innings to get his first win in more than a year, Anthony Rendon homered and Washington beat New York to move back above .500.

Indians 2, Twins 0

MINNEAPOLIS (AP) — Carlos Carrasco struck out 10 in 7 1/3 innings, winning his fourth straight start since returning from the disabled list to carry Cleveland past Minnesota.

Brad Hand got the last five outs for his 26th save of the season and second for Cleveland.

The Indians stretched their lead over the Twins in the AL Central to 10 games.

A’s 8, Blue Jays 3

OAKLAND, Calif. (AP) — Sean Manaea pitched effectively into the seventh inning, Jonathan Lucroy drove in four runs and Oakland completed a season sweep of Toronto.

Tigers 7, Reds 4

DETROIT (AP) — Jose Iglesias drove in three runs, Jim Adduci homered and Detroit survived the loss of pitcher Mike Fiers to an early injury to beat Cincinnati.

Rays 7, Angels 2

ST. PETERSBURG, Fla. (AP) — Willy Adames homered and drove in two on the day Tampa Bay gave him the regular shortstop job.

Royals 10, White Sox 5

CHICAGO (AP) — Alex Gordon hit a two-run homer and drove in four, helping Kansas City pound sloppy Chicago.

Dodgers 6, Brewers 4

LOS ANGELES (AP) — Yasmani Grandal hit a two-run homer — his second of the game — in the 10th inning, rallying the Dodgers past the Brewers to snap a three-game skid.

Comments are not available on this story.