BALTIMORE — The New York Yankees understand the importance of beating the teams they're battling for a playoff berth.
So, after taking care of business at home against Boston, the Yankees opened a road series against the Baltimore Orioles with a decisive win.
Starlin Castro homered and drove in three runs, Didi Gregorius also went deep and New York rolled to a 7-4 victory Monday.
After spotting the Orioles an early lead, New York bounced back for its fourth win in five games. The Yankees enhanced their position atop the wild-card race and remained relevant in the AL East after starting the day 3 ½ games behind division-leading Red Sox. New York took three of four from Boston over the weekend.
"You want to keep it going," manager Joe Girardi said. "The other teams are chasing us and we're chasing the Red Sox. Every day we win it makes it easier for us to try to accomplish our goals. So we've got to play good again (Tuesday)."
Aaron Judge drew a career-high four walks, singled and scored a run to help New York extend its wild-card lead over Baltimore to 4 ½ games.
The Yankees played without catcher Gary Sanchez, who began serving a suspension that was reduced to three games from four. The MLB suspension stemmed from an Aug. 24 brawl during a game against Detroit.
Asked if he felt fortunate that the suspension was shortened, Girardi replied, "I don't think there's ever a feeling that you lucked out because we're going to miss a very good player for three games."
Chad Green (3-0) struck out four in 2 1/3 innings after starter Jordan Montgomery got two outs in the fifth.
Tim Beckham, Chris Davis and Welington Castillo homered for the Orioles, who have lost three of five following a seven-game winning streak.
"Every series is big, especially when you're fighting for the wild card," Davis said. "We have a lot of things working against us, but if we just take care of our business ... that's really all you can do."
Dylan Bundy (13-9) gave up five runs, five hits and four walks in four-plus innings. It was a miserable encore to his previous effort, a one-hit masterpiece against Seattle in his first career complete game.
"Stuff wise was fine," the right-hander said. "It was just really command and location of my pitches today."
Held hitless through three innings and trailing 3-0, the Yankees finally solved Bundy in the fourth. Castro led off with a single, Gregorius homered and Bundy walked two of the next three batters before Jacoby Ellsbury hit an RBI single.
"First couple innings were OK. Just couldn't find his command," manager Buck Showalter said. "I don't care who you're facing. They're a pretty patient team when they see that."
Bundy's outing ended in the fifth, when Castro hit a two-run drive for a 5-3 lead. Castro added an RBI single in a two-run sixth.
Beckham hit his third leadoff homer of the season and Davis made it 3-0 in the second with an opposite-field fly that barely cleared the outstretched glove of leaping left fielder Brett Gardner.
Gregorius, who reached the 20-homer mark for the second straight season, said, "I'm not worried about the home runs. I mean, for me, it's more, try to make improvements, try to get better."
Although Beckham has been an Oriole for only five weeks, the team honored the shortstop by giving fans T-shirts with his name and number. He celebrated the occasion with his seventh home run since joining the team on July 31.
Yankees: With CF Aaron Hicks (left oblique strain) sent to the 10-day disabled list Sunday, Girardi said either Tyler Wade (who was recalled Monday) or Ronald Torreyes could serve as the fourth outfielder.
Orioles: Showalter hopes SS J.J. Hardy (wrist) can come off the DL on Tuesday. 'I'm hoping his activation is imminent," the manager said.
Yankees: LHP CC Sabathia (11-5, 3.71) starts Tuesday night. He's pitched at least six innings and allowed two runs or fewer in each of his last three starts.
Orioles: Jeremy Hellickson (2-3, 6.55 ERA) makes his seventh start with Baltimore. He's 4-2 with a 3.21 ERA lifetime against the Yankees.