SAN DIEGO -- The comeback kids nearly did it again. After two straight walk-off wins, the New York Yankees lost to the San Diego Padres 7-6 on Friday night, but they didn't fall easily. The Yankees scored four times in the ninth and had the tying run at third base before the Padres finally prevailed.

The rally nearly took the Yankees' focus off starter Nathan Eovaldi, but it doesn't erase his run of ineffective pitching. The calendar switched, but not Eovaldi. After going winless in June, he was roughed up in the first contest of the Yankees' 10-game road trip.

“It's frustrating for him because at times he is making good pitches,” Yankees manager Joe Girardi said. “But at times he is missing his pitches and missing his spots. He's got good stuff. But he has to consistently locate it or he is going to get hit.”

After giving up two home runs on Friday night, Nathan Eovaldi has now allowed six homers in his past 10 1/3 innings. Jake Roth/USA TODAY Sports

Eovaldi lasted but 4⅓ innings and was charged with six runs on seven hits with three walks. The latest setback continued a trend of troubling starts for the right-hander, as he started July with a loss, which has him and the team longing for May. He won all five May starts and looked poised to become a leader in a rotation that needed a boost.

Then came his June swoon, which has leaked into July.

“I can do better,” Eovaldi said. “I get in tough situations and I try to do too much. I try to make perfect pitches and I leave them in the middle and they get hit.”

That Eovaldi still leads the staff with six wins after a long skid speaks to the team's pitching struggles. Eovaldi surrendered three runs in the first, with a one-out walk to Wil Myers setting the tone. Melvin Upton Jr. followed with a two-out RBI single before Derek Norris knocked in two more with a double.

Down 3-0 after the first, Eovaldi had to get back on track in the second. This after the Yankees cut the lead to 3-1 on Jacoby Ellsbury's run-scoring single. But instead of Eovaldi buckling down, he got blasted. Rookie Ryan Schimpf snapped an 0-for-13 slump by opening the inning with his first career home run. Eight batters into the game, Eovaldi was already trailing 4-1.

It was home runs that derailed Eovaldi in his last start against the Twins. He allowed a career-high four long balls on Sunday, including three in a row in the sixth inning.

“They are mistake pitches and I'm falling behind in the count,” Eovaldi said. “I'm leaving balls up in the zone.”

The two hit by the Padres weren't cheap ones, with Schimpf's going 408 feet and Myers' 411 to the opposite field. In Eovaldi's past 10⅓ innings, he has given up six homers.

“I know I'm a better pitcher,” he said. “I just have to continue to work harder in between starts.”

Girardi said Eovaldi isn't in danger of losing his spot in the rotation.

“No, not right now,” Girardi said. “We got to get it right. I believe he can do it, I really do. He has too good of stuff.”

New York went deep in the sixth when Brian McCann hit his 13th homer of the season, making it 6-2. Otherwise the Yankees were stymied by the Padres' Colin Rea (4-4). He worked six innings, charged with two runs (one earned) on four hits.

After entering the ninth down 7-2, the Yankees rallied for four runs off the Padres' Matt Thornton and Brandon Maurer, and had Carlos Beltran on second as the potential tying run with one out after a pinch-hit double. But Ellsbury grounded out, sending Beltran to third, and Brett Gardner grounded out, wrapping up the Yankees' fourth loss in six games.

Yankees reliever Conor Mullee left the game in the sixth inning. Girardi said Mullee was feeling numbness in his fingers and that he will be examined further.