Andy Pettitte threw an early pitch exactly where he wanted, and watched Chris Davis launch it over the center-field wall.
Fortunately for Pettitte, most of his later offerings landed in the right spot.
Pettitte stopped the Orioles once again, Eduardo Nunez returned from the 60-day disabled list to get a go-ahead hit, and the Yankees beat Baltimore, 5-4, Saturday in New York for their season-high sixth straight win.
Pettitte hung in there on a hot, sticky day after the Orioles took an early 3-0 lead and ending his four-start winless string.
‘‘I've been frustrated,’’ he said. ‘‘Every decision you’re making, you feel like it’s not the right one.’’
Pettitte stretched his unbeaten streak against Baltimore to 11 starts dating to 2007, winning eight times. Overall, he is 28-6 against the Orioles — only Yankees great Whitey Ford (30) has beaten the Birds more often since the franchise moved to Baltimore for the 1954 season.
Pettitte left with two outs in the seventh inning after 100 pitches. Mariano Rivera worked the ninth for his 29th save.
In addition to overcoming Davis’s 33d home run, the Yankees survived yet another double from Manny Machado, his 39th.
‘‘Any time you’re leading early in the game, you expect to continue to lead, or at least put up some more runs,’’ Davis said.
‘‘One- and two-run leads in this game don’t last very long, especially in this ballpark and with their offense,’’ he said.
Royals 4, Athletics 3 — Jarrod Dyson delivered an infield single with the bases loaded and two outs in the eighth inning as host Kansas City beat Oakland.
The Royals had rallied to tie the game on a sacrifice fly by Eric Hosmer in the seventh, and then loaded the bases on an error and a pair of walks by reliever Ryan Cook.
Dyson showed bunt on his first pitch from Cook before hitting a grounder deep behind second base. Shortstop Adam Rosales fielded it cleanly but didn’t even bother with a throw as pinch runner Alcides Escobar scored the go-ahead run.
Brewers 7, Mets 6 — Jonathan Lucroy homered and Yovani Gallardo scattered six hits over six innings while adding two hits and a pair of runs to lead host Milwaukee over New York.
Braves 13, Phillies 4 — Jason Heyward hit a three-run homer and Atlanta set season highs for runs and hits in routing host Philadelphia.
Tigers 9, Indians 4 — Torii Hunter drove in three runs, Miguel Cabrera cracked a two-run homer, and visiting Detroit won its fifth straight by pounding Cleveland.
Cardinals 5, Marlins 4 — Jon Jay scored from first on right fielder Giancarlo Stanton’s throwing error on Shane Robinson’s single with two outs in the ninth inning, lifting host St. Louis over Miami.
Twins 6, Blue Jays 0 — Brian Dozier hit a three-run home run, Mike Pelfrey and three relievers combined for a four-hitter, and visiting Minnesota shut out Toronto.
Cubs 4, Pirates 1 — Alfonso Soriano hit two-run homers in consecutive innings as host Chicago sent Pittsburgh to just its third loss in 14 games.
Nationals 5, Padres 4 — Bryce Harper drove in three runs, Ryan Zimmerman knocked in the go-ahead run, and host Washington rallied past San Diego.
Reds 13, Mariners 4 — Cesar Izturis drove in three runs, matching his season total, and Mat Latos doubled home two more to rally host Cincinnati to just its second win in 11 interleague games.
Rays 3, White Sox 0 — Matt Moore won his fourth consecutive start to help host Tampa Bay blank All-Star pitcher Chris Sale and Chicago.
Giants 4, Dodgers 2 — Madison Bumgarner drove in two runs and struck out nine in seven innings for host San Francisco.
Astros 9, Rangers 5 — Jason Castro hit a tiebreaking three-run homer hours after being chosen for his first All-Star team, and visiting Houston topped Texas.
Diamondbacks 11, Rockies 1 — Wade Miley pitched eight effective innings and had a three-run double, and Paul Goldschmidt hit a two-run homer as host Arizona cruised.