Aaron Barrett. (Alex Brandon/AP)

Before the Nationals fell to the Orioles, 3-2, on a walkoff home run in the ninth inning on Friday, Aaron Barrett guided his team through a difficult spot. Even though Gio Gonzalez’s pitch count stood at 100 after six innings, Washington Nationals Manager Matt Williams had the left-hander take the mound in the seventh.

But Gonzalez walked the first batter, Jimmy Paredes, on six pitches and showed signs of tiring. Williams removed Gonzalez with a one-run lead and opted for Barrett, who returned from the nearly a month on the disabled list with a right biceps strain.

When he landed on the disabled list on June 12, Barrett couldn’t feel his arm in the game the night before. Overuse had worn him down; he had appeared in 30 of the Nationals’ 60 games at the time. The injury proved to be another lesson for him: speak up when something doesn’t feel right physically and the workload is too much, and find ways to cut down on bits of extra wear and tear.

There was a small chance Barrett could have appeared in the sixth inning Friday, but Gonzalez escaped the jam. Barrett, however, was already up and playing catch. Earlier in his career, Barrett would have thrown plenty of warm-up pitches already in the bullpen, which adds up over the course of a season and career.

“As I’ve learned through last year and this year, I’ve kinda been able to manage my throws and didn’t really get that close to being hot at all since there was only two outs,” he said. “I knew that I had plenty of time to get loose there. I think I managed as many throws as could so I was able to pitch the seventh and be effective.”

So when opportunity called in the seventh, Barrett was ready. Williams has shown a lot of faith in his starters, at times perhaps too much. He let Gonzalez face switch-hitter Jimmy Paredes, and the left-handed starter walked him, bouncing ball three in the dirt and missing high with ball four.

“I was a little flat at the end,” Gonzalez said. “It’s the American League. I can see it in Matt’s situation where you don’t have to hit so there’s no tough situation like bunt or do anything like that. I think him giving me that opportunity to go out there means that’s he’s trusting me deeper into games and it’s just me. I was just a little flat. I wish I could have made a difference on that pitch.”

After the walk, Williams called for Barrett. He struck out J.J. Hardy on a 1-2 slider down and away. He then fanned Jonathan Schoop on three consecutive sliders. Another 1-2 slider got Manny Machado to pop out to escape the inning.

“I felt good,” Barrett said. “A situation where we’re up one and glad [Williams] had the confidence to put me in that situation. I’m trying to get back to help the team out in whatever role is available. I felt good coming back. I felt like I was able, for the most part, to put the ball where I wanted to. I threw a couple sliders that probably didn’t go exactly where I wanted to. But the ones that were down and away were definitely good and able to get some big strikeouts when I needed them.”

Barrett’s fastball was clocking in at 92-94 mph. The biceps strain that cost him a month of the season is no longer an issue.

“I haven’t felt any of the pain or soreness that I was getting when I was feeling it in the past,” Barrett said. “That’s a good sign. It’s about continuing to build the arm strength and continue to keep working and getting out there and being smart at the same time and trying to limit as many throws when I’m warming up and not exactly have to go in. So it’s all feel for the game and just gotta keep it going.”

Barrett helped the Nationals and Gonzalez escape a potentially rough inning. Gonzalez finished the game allowing one run on six hits and three walks over six innings. In 20 innings over his past three starts, Gonzalez has allowed just two runs on 15 hits while walking five and striking out 15.

“Loby did a great job helping me attack the strike zone, helping me out with pitches in the zone,” Gonzalez said. “Loby and I are just sync right now. He’s calling a great game and I’m throwing it where he wants it.”