NEW YORK (AP) The Yankees are finally hitting and pitching well at the same time, and that may keep these batters and hurlers together in New York for at least a little while longer.
Michael Pineda didn't allow a run for the first time this season, Mark Teixeira homered in his return from his latest injury, and the Yankees moved two games above .500 for the first time since April with a 5-0 victory over the Baltimore Orioles on Wednesday night.
Pineda (4-9) had six strikeouts with runners in scoring position, repeatedly wriggling out of jams to get through six innings and protect the bullpen.
New York, which has won the first three of the four-game series, last was two games over .500 on April 12 at 4-2. The Yankees are six games out of first in the AL East and five out of the wild-card spot as management tries to determine whether to unload veterans at the trade deadline.
''You know with the situation looming that it's really important as we move forward - in a sense, it's playoff baseball for us,'' manager Joe Girardi said.
Baltimore lost its fourth straight to fall a half-game behind Boston in the division. Left shorthanded by illness and injury, the Orioles have struggled at the plate, especially with runners in scoring position: They went 1 for 9 Wednesday and are 3 for 33 since the All-Star break.
A stomach bug has been ravaging Baltimore's clubhouse and claimed two more victims Wednesday: third baseman Manny Machado and manager Buck Showalter. First baseman Chris Davis missed his third straight game.
Catcher Matt Wieters was also out with a foot injury. Bench coach John Russell filled in for Showalter.
The bottom third of Baltimore's lineup, all backups forced into action, went a combined 0 for 9.
''We are going to have to find different ways to manufacture a little bit,'' Russell said.
Yovani Gallardo (3-2) couldn't keep it close, though he didn't get much help from his defense. He allowed four runs and five hits with five strikeouts and four walks in seven innings.
Leading off the bottom of the first, Brett Gardner ripped a line drive to the warning track that right fielder Joey Rickard tracked down, but the ball bounced off the inside of his glove. Center fielder Adam Jones then bobbled it, and Gardner motored into third for what was ruled a triple. Carlos Beltran drove him in with a one-out sacrifice fly.
The Yankees had not scored a first-inning run in their previous 23 games.
Trailing 1-0, the Orioles had the bases loaded with one out in the fourth but Pineda struck out Nolan Reimold and Ryan Flaherty. Pineda allowed five hits and two walks, striking out eight, to post his first win since June 7.
He threw 11 pitches to the game's first hitter, Rickard, and was constantly pushing up against a high pitch count - he finished with 113, one shy of his season high. Dellin Betances, Nick Goody and Chasen Shreve completed the shutout to extend the bullpen's scoreless streak to 28 2/3 innings dating to July 9.
Yankees pitchers have allowed one run or fewer in four straight games for the first time since 2003.
Before the game, Teixeira had described this season as ''brutal'' and ''terrible.'' He was batting .186 and had missed three games because of a sore left foot.
Then the veteran first baseman lined a solo homer to right in the fourth for a 2-0 lead. He also walked twice, including on four pitches in the sixth with the bases loaded to force in a run and make it 3-0.
Beltran, who hit his 20th home run of the season in the eighth off reliever Chaz Roe, started at designated hitter, leaving Alex Rodriguez on the bench.
''In order for us to make a run we have to be consistent,'' Beltran said. ''We've been pretty consistent this series.''
Chase Headley, originally in the Yankees' starting lineup, missed the game with an excused absence for personal reasons. Ronald Torreyes replaced him at third base.
Yankees LHP CC Sabathia (5-7) starts on his 36th birthday Thursday to close out the four-game series. He has a 7.48 ERA in four career starts on his birthday; he also has a 7.94 ERA since June 22.
Orioles RHP Chris Tillman (13-2) and the Nationals' Stephen Strasburg will both try Thursday to join Chris Sale of the White Sox as the only pitchers in the majors with 14 wins.