Gio Gonzalez allowed four runs, including three earned, in 62 / 3 innings as the Nationals lost to the Orioles on Thursday. (Toni L. Sandys/The Washington Post)

Ian Desmond wore a cloth bandage around his swollen right hand, water dripping from the melting ice. Minutes later, Jayson Werth hobbled through the Washington Nationals’ clubhouse, limping on his left foot. Just as the Nationals had moved into first place and regained full health, they dropped into a tie and baseballs attacked appendages on two of their best players.

Desmond exited the eighth inning of the Nationals’ 4-3 loss to the Baltimore Orioles on Thursday night after a pitch drilled him on the base of his right thumb and he could not make warmup throws across the diamond. In the defeat’s final at-bat, Werth fouled a ball off his foot before Baltimore closer Zach Britton sawed off his bat on a game-ending groundout.

The Nationals exited Camden Yards with hope they will not lose either their leading home run hitter or their hottest bat for an extended period. The X-rays on Desmond’s hand came back negative.

“It doesn’t feel good,” Desmond said. “But it’s not broken.”

Manager Matt Williams said the ball — an 88-mph fastball from sidewinding right-handed reliever Darren O’Day — smashed into the meaty part of Desmond’s hand, a better outcome than pinching his fingers against the bat.

Desmond is a “long shot” to play Friday night, Williams said. The Nationals could simply hold him out for their entire series against the Philadelphia Phillies, which with the all-star break would give Desmond a full week to heal. Danny Espinosa would replace him at shortstop.

“The good thing is there’s no fracture,” Williams said. “He’ll be sore for a couple days, I’m sure.”

Werth required no tests following the game. He had trouble bearing weight on his foot, but there is a chance he will play Friday night in Philadelphia, his former home. “He is good,” Williams said. “Sore, but good.”

Desmond came to the plate after Orioles Manager Buck Showalter ordered O’Day to intentionally walk Bryce Harper with two outs and Adam LaRoche on second base. Harper had been stuck in a 4-for-31 slump since he came off the disabled list, including a key strikeout in the fifth inning on Wei-Yin Chen’s pinpoint fastball.

But O’Day is hell on right-handers. His deceptive delivery and varied movement enfeebled Desmond for a strikeout in a pivotal spot Monday night at Nationals Park. Desmond walked to the plate with the tying run on second, intent it would not happen again.

“I thought I saw him really well, actually,” Desmond said. “I was happy that the situation came up again.”

Desmond fouled off one 2-2 pitch and readied for another. O’Day releases the ball from below his waist, and the ball can dart in any direction as it nears the plate. Desmond began to swing, and the fastball bore inside. Desmond attempted to pull back his hand, but he could not before the pitch smashed his right hand.

As Desmond walked to first base, he paused and crouched. Williams and head athletic trainer Lee Kuntz ambled out to check on him. Desmond tried to waive them off, and after a brief visit, he stayed in the game.

Wilson Ramos flied out to right-center field to leave the bases loaded, stranding two of the six runners the Nationals marooned in scoring position. Desmond grabbed his glove and headed to shortstop.

Desmond tossed a final warmup throw across the infield, preparation for the eighth inning and a test for his throbbing right hand. The ball sailed over LaRoche’s head at first base and into the first row of stands. Desmond had been glancing at his hand, as if he could bargain with his own body. Now he knew the pain would not negotiate. Trudging toward the dugout, Desmond removed his cap.

“Kind of like you got hit in the funny bone but it’s not really that funny,” Desmond said. “That’s kind of what it felt like.”

As Desmond received an X-ray, the Nationals took their last turn at-bat. After Anthony Rendon’s single with two outs, Werth plastered his foot with a foul ball. Werth walked in a circle away from the plate, and home plate umpire CB Bucknor shooed him back to the box. Williams and trainer Steve Gober emerged from the dugout to check on Werth.

“It’s painful off the top of the foot,” Williams said. “He’s got no gear on down there. CB was encouraging him to get back in the box and get the game going. Jayson needed a little more time, so we decided to go out.”

Once the at-bat resumed, Britton splintered Werth’s bat, and the groundball to short ended the game.

The Nationals’ primary concern lay with Desmond, but they also could regret a night that mixed resilience and poor execution. Gio Gonzalez had not allowed a run in 22 innings, and he found himself down 4-0 after three innings. But he hung tough, and he exited in the seventh with the Nationals trailing 4-3.

Steve Pearce, the second hitter of the game, ended Gonzalez’s streak with a homer to left field. The Orioles seized control when the Nationals made a hash of the third inning. Gonzalez walked Nick Markakis with two outs, and Pearce singled to keep the inning alive. Adam Jones flared a line drive to right field, and Werth’s inelegant fielding allowed Jones an RBI double.

With runners on second and third, Nelson Cruz hit a groundball to the hole to Desmond’s right. Desmond scooped the ball on the run, and rather than trying for the slow-footed Cruz, he tried to flip the ball to third base. His throw sailed over Rendon’s head and to the wall, which allowed a second run to score. Like Gonzalez’s scoreless streak, the Nationals’ 13-game errorless binge went poof. And in a span of four batters, the Orioles’ lead had grown to 4-0.

“I was trying to at least keep the team in the game as long as possible,” Gonzalez said. “But there’s no excuses. I have to pitch better if I want better results. I can’t be walking guys with two outs, and I can’t be falling behind on a good-hitting team like that.”

The Nationals chipped away, using Werth’s solo homer — his fourth in seven games — on Chen’s 0-2 curveball and RBI hits from Desmond and Ryan Zimmerman to creep back into the game. But the squandered chances led to a painful end. The Nationals at least believed they had dodged serious injury, but the Atlanta Braves’ victory in New York pulled them even atop the division.

The Nationals lost the two-city series, two games to one, but they convinced the other dugout they will stay atop the division all year.

“I think we may see them again in October,” Orioles first baseman Chris Davis said.