Nationals pitcher Tom Gorzelanny slumps over on the mound after Philadelphia’s Laynce Nix hit a solo home run in the sixth inning. (H. Rumph Jr/Associated Press)

If the Washington Nationals’ charmed season turns for the worse, a prospect that still exists only in the most pessimistic imagination, remember the way it began: A ball clanged off a railing atop the right field fence at Citizens Bank Park, a home run turned into a live ball and an indefensible assumption by two veterans killed a rally. Pennant race baseball punishes negligence, and Sunday afternoon the Nationals engaged in it.

The Nationals’ losing streak grew to four with a 4-1 defeat to the Philadelphia Phillies, and the dual gaffe of Jayson Werth and Adam LaRoche defined the final chapter of a sweep in Philadelphia. The Nationals’ only threat against dominating lefty Cliff Lee dissipated when they trotted around the bases after LaRoche’s drive to right, only to realize — as the Phillies were tagging out LaRoche and Werth moved up only one base — it had somehow bounded back into the playing field.

“You take nothing for granted in this game,” Manager Davey Johnson said. “I mean, this is a game you never take anything for granted. My two veteran players took it for granted that the ball was out. That’s kind of a mental mistake because you can always review it. You never put yourself in position with the ball still on the field, and two veteran players messed that up.”

Panic, even during the Nationals’ worst losing streak since June 19, remains an unnecessary recourse. They still have the best record in the majors at 77-50 and lead the Atlanta Braves in the National League East by 41 / 2 games.

But the tension that attends any playoff push is rising. After the final pitch, Johnson and General Manager Mike Rizzo conversed behind the closed door of Johnson’s office for nearly 20 minutes, Johnson’s shouts audible from the hallway outside.

The yelling appeared to be the release of frustration after a dispiriting loss, not the start of a rift. Although it was not clear what the argument centered on, Johnson could be heard shouting, “You come down and manage the team.”

“I had a discussion with my boss,” Johnson said later.

The sweep in Philly inspired the Nationals’ first recent brush with worry. Playing with both Ian Desmond and Michael Morse out with injuries all weekend, the Nationals scored five runs in three games. They’ve scored six runs in their past four games. After a day off, they will have a chance to snap out of it Tuesday in Miami with Stephen Strasburg on the mound.

“I don’t think there’s any panic or anything like that,” Werth said. “Although, when you’re in a pennant chase and you’re getting to September, there definitely should be a sense of urgency.”

The sweep also offered an emphatic reminder that the Phillies remain a menace. Miles from contention, the Phillies’ pitching staff makes them a frightening spoiler. Over the weekend, Kyle Kendrick, Roy Halladay and Lee all delivered gems and outpitched the Nationals’ vaunted rotation. The Phillies have beaten the Nationals six of their past seven meetings, a discomforting thought given the Nationals’ schedule: They close with six of nine against Philadelphia.

Nationals players “ain’t easing off the gas pedal,” Johnson said. “They’re grinding. You’re never as bad as you look when you lose, and you’re never as good as you look when you win. Just remember that.

“These guys don’t need a pep talk, they don’t need anything. A couple guys need to get healthy and we’ll be fine. But don’t underestimate this ballclub. They’ve got a fine ballclub over here. We came in and they had a little momentum going their way and we got a little banged up. It happens.”

The Nationals were beaten by talented, game pitching this weekend, but also by their own mistakes. The worst came Sunday, when they entered the seventh down, 4-0. The Phillies had opened up a taut pitcher’s duel with three runs off Jordan Zimmermann in the fifth. They added one when Laynce Nix laced Tom Gorzelanny’s hanging slider into the right field seats.

Werth led off with a dribbler to the left side of the infield, and he made it to second when Lee threw the ball away. LaRoche followed with a deep fly to right field. Werth tagged up. As he watched Nix settle under the ball on the warning track, Werth, ever an active mind, pondered if he would be able to score from second on a tag.

And then the ball landed on the railing that runs along the top of the right field fence. It bounded into the air. Werth played right field in Philadelphia for four seasons, and he had never seen the ball hit the railing and spin back into the field. Anyway, he thought he had seen the ball land on the walkway behind the fence and bounce toward the seats. He started trotting, believing LaRoche’s blast had cut the score to 4-2.

“I had no indication it wasn’t a homer until I was halfway home,” Werth said. “And for some reason [third base coach] Bo [Porter] was screaming about something, and I look up and the ball’s on the way home.”

Behind Werth, LaRoche had circled second base and started jogging to third. Center fielder John Mayberry’s throw had landed in the hands of catcher Erik Kratz. Werth scampered back to third, but LaRoche was stuck in a rundown.

“I screwed up,” LaRoche said. “I should’ve stopped at second there. Got a little confused coming around second. Looked up and saw Jayson breaking for home and then was going to try to get into third, and he came back. Just a cluster.”

The play began with a bizarre bounce. It ended with a mess. A replay review confirmed the non-homer call. Rather than a man in scoring position, one run home and no outs, the Nationals had a runner on third and one out. Werth had managed to move up one base on a double.

“I obviously messed up the play, cost Rochie an easy RBI and potentially cost us a win,” Werth said.

After their lost weekend, the Nationals likely would prefer to leave town as fast as possible. But they planned to spend Sunday night in Philadelphia, needing to avoid Hurricane Isaac in Miami. They would try to move on in, even as they had to stay put.

“It’s a frustrating few losses here, for sure,” LaRoche said. “We ran into some really good pitching. Tough stretch. . . . They’re better than their record. We were just a little flat, they weren’t.”