‘We’re gonna get through it’: The Washington Nationals are in good spirits after beating the Pittsburgh Pirates, 3-1, in their home opener

Washington Nationals outfielder Ryan Zimmerman has become a symbol of hope in the city that just won’t quit.

He had a hit on his way to a walkoff homer in the first inning, and he was at his best as a hitter with a .383 on-base percentage and six homers in nine games.

And in a rare win over a division rival, the Nationals won despite having a one-run lead late in the seventh inning.

“I just want to thank everybody, everyone in this organization,” Nationals manager Dusty Baker said.

“It’s a little bit of a bittersweet ending, but it’s not going to last.

We got through it.”

Manager Davey Johnson also got a shot at a postseason run, pitching seven shutout innings for the first time in his career.

“We’re all ready to go,” Johnson said.

Baker, who has been fired after the season, said he hopes to get a playoff run out of Zimmerman, a former All-Star who signed with Washington as a free agent.

He also was a major factor in the Nationals’ 4-3 victory.

The Nationals have won their last three games by a combined nine runs.

The Pirates, though, were looking to bounce back after a 4-6 series sweep in which they blew a 1-0 lead in the third inning.

Pirates starter Brad Ziegler (1-0) was the only pitcher in the American League with at least two earned runs.

He allowed four hits, including three homers.

“The bullpen’s been doing a great job, which is why I think they’re so close to winning this game,” Zieglin said.

The Pittsburgh Pirates were without two of their top players in slugger Giancarlo Stanton and pitcher Matt Harrison, who were both on the disabled list.

Pittsburgh starter Tim Hudson (6-5) was placed on the 15-day disabled list with a right shoulder strain.

“He’s still not ready,” Baker said of Hudson, who was scheduled to pitch Monday night.

Pirates manager Clint Hurdle was asked about Stanton’s absence.

“If you’re going to go through a long period of time with injuries, it’s important that you’re healthy,” Hurdlesaid.

“Obviously, we’re hoping that it’s going to be the case, and we’ll take that as a good sign.

It was a good win.”

Stanton, who had seven home runs, walked four and struck out three in his last two starts.

“This guy’s been one of the best hitters in the game,” Pirates manager Tony Watson said.

It’s the first playoff game in which the Pirates have not won since their final game of the season in late December.

Pittsburgh was swept by Detroit in six games in the World Series in 2015.

The Cubs also lost to the Nationals in the last round in six.

“Just the fact that we played in that stadium in Pittsburgh and had so much respect for them and how they played and what they did, it was awesome,” Pirates outfielder Anthony Rendon said.

But they had the advantage in pitching and in defense.

Pirates reliever Josh Tomlin allowed three runs and six hits in four innings, and Pirates starter Mike Leake was solid in his only outing since the All-Pro left the lineup in late July.

He struck out four, walked one and allowed just one home run.

“You can’t play with confidence in a situation like this,” Huddlesaid, who allowed one run on six hits.

The home run by Ziegman was his third this season.

He was the first player with four home runs this season in Pittsburgh.

Pirates pitcher Jordan Zimmermann also had a home run, which he had not done since his season-opening series at Toronto on July 9.

“Zimmermann has been the best in the league for the last three years, and for us, it wasn’t a bad day,” Baker added.

Pirates outfielder Evan Longoria added a double in the fourth inning for his fifth homer of the year.

The two players combined to hit a combined .314 with 10 homers, 21 RBIs and 37 stolen bases.

Zimmermann was 4 for 11 with three RBIs in the series.

The victory was the fourth in six meetings between the two teams.

The previous meetings were all decided in the ninth inning or later.

The teams traded blows in the bottom of the ninth after the Pirates scored in the eighth inning and won a walk-off rally.

Pirates starting pitcher Jordan Montgomery had been hitting .215 in his first nine starts, but he was a big reason for the Pirates’ victory.

He started the inning with a walk and a single before striking out one and walking the other in the sixth.

“In the seventh, I got my first hit of the game.

It just shows you what you can do in