Jayson Werth makes a catch on a line drive during the eighth inning. (Nick Wass/Associated Press)

The ball hit Ian Desmond’s outstretched glove just behind second base and then popped out. It trickled just far enough away that the runner on second base, Jorge Cantu, the winning run, bolted around third base for home. Desmond made a desperate, off-balance throw. It arrived at the plate a split-second late.

It happened like that — a groundball, a dive, a near-miss throw, a game lost. Afterward, Manager Jim Riggleman asked, “Is that unlucky?”

The question hovered over the Washington Nationals5-4 loss to the San Diego Padres on Sunday afternoon, an exasperating defeat stuffed with stranded runners and squandered chances. The Nationals had a chance to stabilize their season this weekend, playing the offensively inept Padres at Nationals Park. San Diego took the series, spoiling Yunesky Maya’s season debut and handing Drew Storen his second loss.

“This isn’t going to cut it, the way we’re playing right now,” Desmond said. “It’s unbelievable. We’ve got to turn the gear. We’ve got to do something different. There’s no other word to say other than ‘frustrating.’ I don’t know what’s going on. We got to start scoring runs for our pitching staff. We got to find a different answer.”

The Nationals have lost nine of 11, and they are in agreement something needs to change. Maybe the first thing is their luck. They are 5-11 in one-run games, the worst mark in the majors in games that could break either way. They’re almost last in the league hitting. They might be worse at flipping coins.

“Those are tough losses,” Storen said. “A loss is a loss, but these ones really sting.”

They might have won Sunday if Matt Stairs’s screaming line drive in the eighth inning had not zipped straight at the right fielder . . . if a passed ball hadn’t hit an umpire in the sixth . . . if they did not strand a runner in scoring position in five innings . . . if Ryan Ludwick’s game-winning single had rolled a few inches to the left.

Is that unlucky? The Nationals are batting .229 this season, and Sunday they came up empty in the sixth, seventh and eighth when the go-ahead run stood on second with no outs. The Padres had not scored more than three runs in a game since May 16, and they scored four off Maya in 42 / 3 innings, including the inherited runner Doug Slaten allowed to score.

“It’s not about breaks,” Desmond said. “It’s about playing the game the right way. It’s not about luck. We’re not unlucky. We have runners in scoring position, and we can’t score them. It starts with me. I left runners out there. I’ve been leaving runners out there. I got to do something different. We all got to do something different.”

Desmond found no solace coming close on the game-deciding play, even after he reached a ball “I didn’t think he would,” Storen said. Cantu had doubled with one out in the ninth, and with two outs Ludwick hit his grounder up the middle. Wilson Ramos could not corral Desmond’s desperate throw home as Cantu slid in, but it may not have mattered.

“The umpire told me he would have been safe,” Ramos said.

For the rest of the afternoon, the Nationals’ best moments alternated with their most maddening. In the sixth, with the Nationals down 4-3, Jayson Werth led off with a single off reliever Chad Qualls. He moved to third on a slick hit-and-run as Laynce Nix bounced a single through the right side. Michael Morse grounded to third baseman Chase Headley, who made an odd decision to throw to the plate. Werth slid home safe.

The Nationals had tied the game, and with two on and none out, they were in business. They went about squandering the chance to take the lead with staggering efficiency. Ramos, a power-hitting catcher, dropped down a sacrifice bunt — Riggleman wanted to avoid the double play against the sinkerballing Qualls.

Jerry Hairston followed with a chopper to third. Nix was running on contact, and Headley fired home, nailing Nix. That was the second out. With Morse batting, Qualls bounced a breaking ball that skipped away from catcher Kyle Phillips. On second, Morse started for third, then stopped when he saw the ball hit the home plate umpire. On first, Hairston never saw the ball hit the ump.

Phillips corralled the ball and fired to first. Hairston flailed his arm and let Brad Hawpe tag him, then motioned to Morse as if to ask what happened.

“It definitely wasn’t a loss that went our way,” Hairston said. “Ninety-nine percent of the time, it gets by the catcher and goes to the backstop. It’s one of those freak plays.”

The play, along with so many others that broke against the Nationals, left them in a precarious spot. Next the Philadelphia Phillies, having beaten the Nats five straight times this year, come to Washington. Roy Halladay, Cliff Lee and Roy Oswalt will pitch. “It’s just a gut test,” Storen said.

It will be a hard three games to fix what is wrong. Is that unlucky? The Nationals may be sinking to the bottom of the league, but they will not use that as a reason why.

“We had a chance to have good luck,” Riggleman said. “And we just didn’t take advantage of it.”