Ryan Zimmerman hit a solo home run in the ninth inning to give the Nationals a victory over the Mets in the second game of a doubleheader Friday night. (Toni L. Sandys/THE WASHINGTON POST)

The Washington Nationals’ topsy-turvy season continued on Friday, with enough twists and turns in one day to fill a novel. They suffered one of the worst defeats of the season in the first game of Friday’s doubleheader against the New York Mets, as their offense, stalwart starter and former closer stumbled. They stared down a virtual tie in the standings with the rebuilding Mets until Ryan Zimmerman clobbered a walk-off homer in the second game to salvage a doubleheader split.

Zimmerman’s ninth career walk-off homer gave the Nationals a 2-1 victory in the night game, a second walk-off win in two days that moved them into second place in the National League East, still 8.5 games behind the Atlanta Braves. The Nationals dropped the first game of the doubleheader, an 11-0 drubbing by the Mets, when Jordan Zimmermann gave up five runs and struggling reliever Drew Storen made his last appearance, despite suffering from the flu, before being sent to the minors after the doubleheader to correct his season.

“Unfortunately, it’s a roller coaster ride,” Zimmerman said after the night game in a subdued clubhouse following the hectic day. “We’ve been down a little bit more than we’ve been up this year. But just gotta keep going.”

This Nationals’ season has been defined by its zaniness and inconsistency. A talented lineup is among the worst in the majors. Zimmermann, the team’s most consistent starter all season, turned in a mediocre start against the Mets in Friday afternoon’s game. Ross Ohlendorf, a minor league free agent this winter and perhaps the seventh or eighth guy on the organization’s starting pitching depth chart, pitched seven dominant innings in the night game, keeping the Nats close against Mets ace Matt Harvey.

Storen, who saved 43 games for the team in 2011 and has struggled in his first full season as a setup man, sputtered through two-thirds of the ninth inning of Friday’s opener and was then optioned to Class AAA Syracuse after the rousing finish to the second game. Teammate and close friend Tyler Clippard criticized the organization for its handling of Storen, whose blown save in Game 5 of last season’s National League Division Series may have contributed to the Nationals signing closer Rafael Soriano. This season has been filled with thrilling wins and head-scratching losses, but no day may have featured as much drama and emotion as Friday.

The Post Sports Live crew debates whether the Nationals can still make it to the postseason, despite the hole they have dug themselves. (Post Sports Live)

The Nationals’ season-long offensive slump continued throughout the day, in large part because of the pitching of Harvey and starter Jenrry Mejia in the first game. Washington snapped a 13-inning scoreless streak in the fifth inning of the second game with the help of a Mets miscue. Jayson Werth led off the inning with a single, one of his three hits off Harvey, and Ian Desmond drew a five-pitch walk.

After a Steve Lombardozzi strikeout, Wilson Ramos hit a chopper up the middle. Shortstop Justin Turner stopped the ball and, in one motion, flipped to second baseman Daniel Murphy to start a double play. Murphy, however, barehanded the ball and misfired toward first base, hitting Ramos. Werth scored from second on the error as the Nationals tied the game at 1.

The Nationals have a lot of moving parts in their pitching staff, but Ohlendorf has stepped in nicely. Rookie right-handed starter Taylor Jordan, brought up from Class AA Harrisburg to fill in for Dan Haren and then Ross Detwiler, has about a month left before his team-mandated shutdown in his first full season back from Tommy John surgery. Detwiler will be out another month with a herniated disc in his back. Ohlendorf, converted to a long reliever this season, provided the Nationals with valuable insurance.

Making his second spot start of the season, Ohlendorf twirled seven brilliant innings, struck out eight and allowed only one run on two doubles in the fourth inning. A ragged Nationals bullpen needed as much as possible out of him and Ohlendorf delivered.

In the seventh inning, Ohlendorf pitched the Nationals out of trouble. Leadoff hitter Andrew Brown reached on an error by Zimmerman. A sacrifice bunt moved Brown to second base. Ohlendorf coaxed a flyout to center from Juan Lagares and, after a coaching visit, walked Murphy. No one was warming in the bullpen and Ohlendorf’s pitch count stood at 113. Ohlendorf got David Wright to pop out to end the inning with his 114th pitch, the most he has thrown in a major league start in four years.

“He pitched his heart out,” Manager Davey Johnson said. “He was basically out of gas in the last inning, but I had more confidence in him locating the ball and changing speeds to get through it.”

In the opener, the Nationals failed to capi­tal­ize on any momentum they might have gained from Thursday’s walk-off win against the Pirates. Zimmermann was far from his best, the offense did little and three relievers combined to allow six runs on seven hits. The Nationals looked lifeless, each inning feeling progressively worse.

Ryan Mattheus, in his first game back after missing more than two months with a self-inflicted broken right hand, allowed three runs on 43 pitches over 11 / 3 innings in relief of Zimmermann and Fernando Abad. An already dreadful game turned into wretchedness when Johnson curiously called on Storen, in the midst of the worst season of his young career, to relieve Mattheus in the ninth inning with one out.

In 10 pitches, Storen allowed three hits, including a three-run home run by Ike Davis. The pitching change was puzzling because before the game Johnson said that Storen was likely unavailable all day because he was battling the flu. But Storen improved enough to pitch, Johnson said. A few hours later, Johnson imformed Storen that he had been optioned to Syracuse to “get right mentally and mechanically.”

“This is what’s best for him,” Johnson added. “He’ll probably have a hard time coming to grips with that, but it is the best thing for him.”

Soriano, who replaced Storen as the closer this season, struggled in the ninth inning of the second game. The day before, he was yanked as he stumbled in a non-save situation, a game that was rescued by a walk-off homer by Bryce Harper. On Friday, he pitched around two men on with one out in a tie game.

With one out in the bottom of the inning, Zimmerman clobbered a fastball from LaTroy Hawkins into the right field seats, snapping a streak of 47 at-bats without an extra-base hit. Teammates mobbed Zimmerman at home plate and walked off the field victorious after a wild day of loss, disappointment and struggle.