Rookie Erick Fedde allowed three runs and seven hits in 5 1/3 innings Monday night in Washington’s 4-2 nightcap loss. “He pitched well except when he made one mistake,” Manager Dave Martinez said. (Katherine Frey/The Washington Post)

At the end of the fifth inning Monday night, after he surrendered a home run and the lead, Erick Fedde turned around a few steps from the dugout and stared back out at the diamond.

“I was just frustrated,” Fedde said. “I was looking like, ‘How could I have done that?’ ”

The Washington Nationals rookie right-hander remained rooted there for several seconds, hands on hips. He had gotten out of the frame on a caught stealing, his showdown with New York Yankees slugger Giancarlo Stanton left unresolved. Fedde had already given up two hard-hit singles to Stanton, and he wanted a chance to finish this battle.

Washington’s 4-2 loss to New York in the nightcap at Nationals Park seemed like a subplot on an evening all about the Nationals’ pitching. Within minutes of Washington’s front-office acquiring reliever Kelvin Herrera from the Kansas City Royals, the Nationals’ 2014 first-round pick, who entered this season as their top pitching prospect, came back out in the top of the sixth and struck out one of baseball’s top sluggers.

This was the 25-year-old’s third start of the season, his second appearance against one of baseball’s best offenses in six days after replacing the injured Stephen Strasburg in the rotation last week in New York. He struggled to find the plate — 55 strikes on 97 pitches — and a few missed spots spoiled what Nationals Manager Dave Martinez saw as a strong outing in which Fedde threw “the ball really, really well.” He allowed three runs, seven hits and two walks and took the loss.

“He pitched well except when he made one mistake,” Martinez said, referring to Aaron Hicks’s two-run homer in the fifth. “We were very, very excited to see this.”

After allowing a double to the game’s first batter, Hicks, Fedde largely zipped through the first three innings. He relied on his slider and sinker — which account for more than half of his pitches this season, according to Brooks Baseball — to prevent anyone from squaring up the ball. Even when Stanton knocked a sharp single to right in the top of the fourth, Fedde responded on the next pitch, geting Gleyber Torres to ground into a double play.

“I’ve been working with Max [Scherzer] on a new slider,” Fedde said, adding that he’s throwing it harder. “Because my old one, I’m having a little more trouble with it up here [in the majors].”

In the fifth, the Yankees began to figure out Fedde’s approach. Austin Romine hit a cutter sharply for a single, and, two batters later, Hicks deposited a sinker into the right-center field bleachers. Fedde found a way to strike out Aaron Judge for the second time but gave up a rocketed single up the middle to Didi Gregorious, who was quickly thrown out trying to swipe second.

In the top of the sixth, after Stanton struck out, Torres drilled the second cutter he saw into left for a single, and Martinez strode to the mound. He plucked the ball from Fedde, who wiped his mouth and walked toward the crowd. About half of those in attendance stood, while half politely clapped from their seats. Then Fedde reached the dugout steps, shuffled down them and high-fived those waiting for him. He had not looked back.