NEW YORK -- Starlin Castro, Nathan Eovaldi and Anthony Swarzak helped the Yankees get back over .500 and chip away at the huge gap with AL East-leading Baltimore. New York will need a lot more wins during the rest of July to persuade management not to jettison veterans for prospects.
"Nobody in this room believes we can't do it," Swarzak said after retiring eight straight batters in relief of Eovaldi during Tuesday night's 7-1 win over the Orioles.
Castro homered in the second off Vance Worley (2-1) and hit a two-run double in the sixth against Odrisamer Despaigne. Chase Headley added a two-run homer off Mychal Givens in the eighth as the Yankees won their third straight.
Relieving Eovaldi with the bases loaded and a 3-1 lead in the sixth, Swarzak got major league home run leader Mark Trumbo to foul out to Rob Refsnyder with his back to the plate down the right-field line and Jonathan Schoop to foul out to shortstop Didi Gregorius.
New York closed within 6½ games of Baltimore and ensured it would be no more than five games back for the second AL wild card. Time is running down for the team's decision whether to buy or sell as the Aug. 1 trade deadline approaches.
"I try not to think about that. I try to focus on the game, the game in hand, and my focus is making up ground," Yankees manager Joe Girardi said.
At 47-46, the Yankees are above .500 for just the third time since mid-April. New York was 4-2 before dropping to 9-17 and later got above .500 at 31-30 and 37-36 only to regress.
"It's been frustrating this year, because we've been here so many times and we haven't been able to break through," Girardi said. "I feel like if we can get over that mark, we can build on it."
Making his first start since July 1 following three relief outings caused by a six-start winless streak, Eovaldi (8-6) won for the first time since May 29. He allowed one run and four hits in 5 1/3 innings, needing 18 pitches to get through the first but 37 for the next four.
"I don't really think about getting traded," said Eovaldi, who is eligible for free agency after the 2017 season. "I feel like it kind of takes away from what I need to do here. I started out with this team, and want to finish with this team, and I feel like we've got a really good chance of coming back and coming through."
Swarzak was assisted by Refsnyder, the rookie first baseman who caught Trumbo's foul and made a two-hop throw home that held Adam Jones at third. Nick Goody followed and struck out the side in a perfect ninth, giving the Yankees' No Runs DMC trio a rest.
"Yeah, he could be that guy," Girardi said of Swarzak.
Baltimore has lost three straight, and its AL East lead over second-place Boston was cut to one-half game. First baseman Chris Davis (stomach virus) missed his second straight game and catcher Matt Wieters (sore right foot) also was out.
Worley (2-1) made his first start since April 15 following 18 consecutive relief appearances. He allowed three runs, three hits and four walks in 4 1/3 innings.
New York's Jacoby Ellsbury grounded to shortstop in the first but his swing knocked off the glove of Caleb Joseph, who was charged with catcher's interference. Ellsbury has reached on catcher's interference nine times, the most in a season since Roberto Kelly's eight, also for the Yankees, in 1992. Ellsbury has done it 23 times in his career, the most among major leaguers since Pete Rose's 29, according to the Elias Sports Bureau.
"There's probably nine catchers that would like to see something change. It just doesn't seem fair to the defense," Orioles manager Buck Showalter said.
New York failed to score in the first inning for the 23rd consecutive game.
The Yankees open the 2017 season at Tampa Bay on April 3, according to the team's draft preliminary schedule, then go to Baltimore before their home opener, slated to be against the Rays on April 10. Some openers likely will be moved to April 2 for ESPN telecasts.
Yankees: 1B Mark Teixeira was out of the starting lineup for the third straight game because of a sore left foot.
RHP Michael Pineda (3-9) is to start for the Yankees on Wednesday and RHP Yovani Gallardo (3-1) for the Orioles. Pineda is 0-3 with a 4.46 ERA in six starts since beating the Los Angeles Angels on June 7.
Mets' Cohen would consider it a disappointment if no World Series title in 3-5 years
Steve Cohen says he didn't buy the New York Mets to be mediocre and that he would consider it a disappointment if they didn't win the World Series in the next three to five years.
New York Mets to focus on hiring general manager, abandon baseball president search
The Mets have abandoned their search for a president of baseball operations and will instead focus on hiring a GM who will report to team president Sandy Alderson.
Chicago Cubs president Jed Hoyer gets five-year contract
New Cubs president of baseball operations Jed Hoyer agreed to a five-year contract, the team announced Monday.
Chicago White Sox to host New York Yankees in Field of Dreams game on Aug. 12
The Chicago White Sox will host the New York Yankees in the rescheduled Field of Dreams game in Dyersville, Iowa, on Aug. 12.
DeMarlo Hale replaces Brad Mills on Terry Francona's Cleveland Indians coaching staff
DeMarlo Hale will replace bench coach Brad Mills on Terry Francona's 2021 Indians coaching staff.
MLB during COVID-19: Behind the scenes with the New York Yankees through Adam Ottavino's lens
Reliever Adam Ottavino photographed one of the most surreal seasons in MLB history. He shared some of his favorite images -- and the stories they tell.