BALTIMORE -- John Ryan Murphy delivered a go-ahead two-run double off Brian Matusz in the fifth inning and the Yankees held on for a 5-3 victory over the Orioles on Sunday afternoon, salvaging the final game of a weekend series at Camden Yards.
"I got into a good count; he left me a good pitch to hit," Murphy said. "Any inning we score runs is a good inning, but of course when it's a tied game it feels a little bit better."
Baltimore starter Mike Wright walked all three batters he faced in the frame before exiting, charged with five runs in four-plus innings.
"I didn't feel like I was pitching frustrated," Wright said. "I was trying to battle the whole game, but they were just a little bit better than I was today."
Yankees starter Adam Warren lasted just 4 2/3 innings, permitting three runs and six hits, before yielding to the bullpen. It snapped a string of five straight quality starts by the right-hander. Chasen Shreve earned the victory with 1 1/3 innings of scoreless relief, and Dellin Betances recorded his third save.
"You don't want to get swept; it's a division opponent," Yankees manager Joe Girardi said. "We did not play well the first two days, but we played much better today. We didn't give them extra outs and we won the game."
MOMENTS THAT MATTERED Murphy's Law: Wright worked himself into trouble in the fifth inning, and Jones greeted left-hander Matusz by looking at a 3-2 pitch for a game-tying walk. Matusz rebounded to strike out the next two hitters, but Murphy delivered the go-ahead hit that the Yankees needed. Murphy tied a career high with three hits.
"I guess any time you hit the ball that way, you expect it to be caught," Murphy said. "It was a tough play for [Machado], diving down the line. I hit it hard."
Wright struggles in spot start: Wright didn't have his best stuff on Sunday while filling in for the injured Miguel Gonzalez. The right-hander gave up a run in each of the first two innings and three in the fifth. He allowed six hits, five runs, three walks and one hit-by-pitch while striking out two.
"It was a hot day. I got a little worn down," Wright said. "They were fouling off good pitches all day. I was trying to make better pitches and they ended up not being anywhere close."
Early hook for Warren: The Yankees will have a decision to make this week, as Ivan Nova appears ready to return from his Minor League rehabilitation assignment, and they may have telegraphed part of their thinking by removing Warren with two outs in the fifth inning. Warren threw 92 pitches in a no-decision effort, permitting three runs and six hits while walking three and striking out five.
"The competitor in you wants to finish that and get deeper in the game," Warren said. "It worked out for us. I want to win ballgames. I'm not concerned with having wins under my name or whatnot, as long as we win as a team. It worked out, so no problem with it at all."
"It's always good not to get swept, truthfully. We played pretty bad the first two games, and for us to come back out and put a good ballgame together, get a win and head to Miami -- we bounced back." -- Yankees left-hander Justin Wilson
WHAT'S NEXT Yankees:Masahiro Tanaka (4-1, 2.48 ERA) takes the mound for his seventh start of the season on Monday as the Yankees open a four-game home-and-home Interleague series with the Marlins at 7:10 p.m. ET. Tanaka has pitched well in two starts since returning from the disabled list, hurling seven innings of one-run ball in each outing.
Orioles:Wei-Yin Chen (2-4, 3.21 ERA) takes the mound for the Orioles on Monday in the first of four straight games against the Phillies, with two being played in Baltimore and two in Philadelphia. The left-hander ended a three-game losing streak when he threw five innings and beat the Red Sox on June 10. The game is scheduled to start at 7:05 p.m. ET.
Bryan Hoch is a reporter for MLB.com. Follow him on Twitter @bryanhoch, on Facebook and read his MLBlog, Bombers Beat. Connor Smolensky is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.