Nationals starter Blake Treinen allowed two runs over five innings before the bullpen turned a tight game into a laugher. (Kelley L Cox/Usa Today Sports)

Bats clattered into equipment bags, shirts were stuffed into suitcases and players wrapped ties around their necks Thursday afternoon in the Washington Nationals’ clubhouse. Faces were agitated, not angry or forlorn. Few words were spoken — but out of ritual, not emotion. They had been bested by an old nemesis in a new place. They could not conjure much disappointment.

Tim Hudson tormented the Nationals for years as an Atlanta Brave, and in their first meeting with him on the West Coast, Hudson tamed the Nationals for seven innings, beat rookie Blake Treinen and led the San Francisco Giants to a 7-1 victory at sun-splashed AT&T Park. The Nationals settled for a series victory against the team with the best record in the National League, an outcome they were plenty happy to carry with them to St. Louis.

The Nationals have still won 10 of 13, and they remained a full game ahead of the Braves, who lost in Colorado, in the NL East. In Thursday’s finale, they lost by more than three runs for the first time since May 11. For the Nationals, the end did not spoil the whole.

“You never like to lose, but at the same time, you got to look at the big picture here,” utility man Kevin Frandsen said. “We came in and played pretty good baseball four days in a row at a place that’s pretty tough to win. Shake it and come back tomorrow. You can’t be down about this game.”

Hudson cooled off the Nationals for a day. With the help of outstanding infield defense, Hudson allowed one unearned run on six hits, squelching the threats the Nationals managed. Hudson made his 30th start against the Nationals, and he is now 17-5 with a 2.45 ERA against them. In his 16th season, at age 38, Hudson leads the major leagues with a 1.81 ERA.

Blurb: With the starting pitchers turning in solid performances and the offense clicking, the Post Sports Live crew looks at whether the Nationals' road trip to San Francisco and St. Louis will be a good barometer for the team's status as a contender. (Post Sports Live/The Washington Post)

“That’s what you get from Tim,” said first baseman Adam LaRoche, who knows Hudson so well he used to stay at the pitcher’s house when the Nationals played in Atlanta. “He just doesn’t lose if you get him three or four runs. He was good. Even at his old age, he still finds a way to get it done.”

This time, Hudson beat Treinen, who made his final start as a placeholder in the Nationals’ rotation. On Thursday night in Class A Potomac, Gio Gonzalez made his final scheduled rehab start before coming off the disabled list and hopping back into the Nationals’ rotation. The Nationals lost all three of Treinen’s starts, but he allowed no more than two runs in any outing. On Thursday, Treinen allowed two runs over five innings, walking three and yielding five hits, before the Nationals’ bullpen turned a taut affair into a laugher.

“I’m confident that I can compete at this level,” Treinen said. “But I still need to improve. My fastball command right now has not necessarily been where I’d like it to be.”

The Giants struck first in the second inning. Michael Morse — the slugger the Nationals traded to acquire Treinen and two other pitchers — singled up the middle to lead off. Tyler Colvin hammered a triple to right-center field, and Morse crossed for the game’s first run. With no outs, Manager Matt Williams kept his infield back, and Brandon Crawford’s grounder scored Morse with ease.

Ryan Zimmerman’s RBI single in the third inning pulled the Nationals to within a run. Treinen labored into the fourth inning, at which point he strapped on leg irons and wrist shackles and tossed himself overboard. Morse singled to lead off the inning, and Treinen issued walks to Colvin and Crawford. Pitching coach Steve McCatty clambered to the mound, and in the bullpen Craig Stammen started warming up.

“He was just a little bit all over the place,” Williams said.

Just as Treinen’s day appeared headed for a sudden end, he burst to the surface and exhaled. He struck out Ehire Adrianza with a wicked, 85-mph change-up. He had gotten to Hudson in the lineup. He threw a first-pitch curveball and then induced a 4-6-3 double play from his counterpart. Treinen pumped his fist on his way off the mound, still down just a run.

“When things weren’t going right, he didn’t coward through it,” Frandsen said. “He battled through it. He got the groundballs when we needed. For a young guy, that shows us more than anything. He’s not going to shy away from a little adversity he had been dealt.”

The escape provided a jolt to the Nationals’ offense. In the fifth, Frandsen ripped a single to left and bolted to third on Jose Lobaton’s single to right-center. With no outs, the Nationals had placed runners on the corners.

And then Hudson executed an escape of his own. Treinen deflected three chances foul, unable to move Lobaton to second base. The flawed execution haunted him. Denard Span chopped a grounder over the pitcher’s mound. If Lobaton had been moved to second, Frandsen would have dashed home for the tying run. Instead, Crawford ranged to his left for an inning-ending double play.

“A little different game, maybe, if he gets that down,” Williams said.

The Nationals’ bullpen may have let the game unravel, anyway. Stammen yielded two singles to put runners on first and third with no outs. With Colvin at the plate, Lobaton cycled through signs.

Stammen thought he agreed to throw a slider. As he moved into the set, he realized he had actually nodded at the fingers suggesting a change-up. At the fleeting confusion, Stammen flinched. Plate umpire Quinn Wolcott called a balk, and the Giants’ third run walked home.

“When we went on this road trip, we thought we’d really figure out where we’re at,” Stammen said. “We need to finish it strong in St. Louis. It’s a place we’ve always struggled at. It would have been nice to sweep. We were in the game for a while. We just let it slip away at the end.”