WASHINGTON — On a team loaded with stars, two rookies played key roles in Washington’s win Thursday night.

Brian Goodwin had two hits, including a home run into the second deck leading off the eighth inning, Andrew Stevenson made a game-saving catch and the Nationals rallied past the Miami Marlins 3-2.

Goodwin broke a 2-2 tie when he connected on a 1-0 fastball from Junichi Tazawa (1-2) for his 13th homer of the season and second RBI of the night.

“He’s a quick learner,” manager Dusty Baker said. “How many teams could lose two centerfielders (Adam Eaton and Michael Taylor) and then (Goodwin) steps up?”

Due to injuries, Goodwin has played in 72 games for Washington, and his 35 extra base hits rank fourth among NL rookies.

Washington got three innings of scoreless relief from its recent bullpen acquisitions.

Brandon Kintzler handled the seventh inning, Ryan Madson (2-0) pitched a scoreless eighth and Sean Doolittle worked around a one-out double by Miguel Rojas in the ninth for his seventh save since coming to Washington.

“Those guys are coming in and they’re shutting people down,” Goodwin said. “They’re going right at hitters and attacking them and they’re being kind of vicious about it.”

Madson got a huge assist in the ninth from rookie left fielder Stevenson.

Stevenson made a diving catch near the foul line on a bloop by Dee Gordon with a runner on third to save a hit for the game’s final out.

Giancarlo Stanton, who hit his Major League-leading 39th home run of the season, earlier in the game, was on deck.

“Off the bat I knew it was slicing, I figured I had a good chance at it though,” Stevenson said. “He was a little late on the fastball. He hit it right where we thought he would.”

Washington took three of four in the series and leads second-place Miami by 15 games in the NL East.

Washington starter Tanner Roark allowed two runs, four hits and five walks (two intentional) over six innings. Since the All-Star break, Roark is 3-1 with a 2.97 ERA.

Dan Straily of Miami had allowed only one baserunner before Adrian Sanchez led off the sixth with a double just inside third base.

After Roark bunted Sanchez to third, Goodwin smacked a single past a diving Gordon to score Washington’s first run. Goodwin stole second, and – after a missed a sign – Bryce Harper doubled off the wall with first base open and Ryan Zimmerman on deck.

“We’ve got a back pick on (at second), and instead of throwing the back pick we throw a pitch,” Marlins manager Don Mattingly said. “So that cost us basically. We were going to have to go after Zimmerman there instead of Harper, but we ended up going after the wrong guy.”

After Gordon singled to open the third, Stanton homered to make it 2-0.

NATIONALS’ NEMESIS

Stanton has 32 career home runs against the Nationals. He broke a tie with Hanley Ramirez (31) for the most homers by any active player versus Washington.

WHIP SMART

Since joining the Nationals, Madson has struck out 13 batters and walked just one.

TRAINER’S ROOM

Marlins: Mattingly said 1B Justin Bour (on the DL since July 25 with a right oblique strain) has yet to resume baseball activities.

Nationals: 2B Daniel Murphy (hip) was back in the starting lineup for the first time since Monday, though he pinch hit Tuesday. … 3B Anthony Rendon (illness) was out of the lineup, but flied out as a pinch hitter. … INF/OF Howie Kendrick (back stiffness) was not in the starting lineup. … SS Trea Turner (right wrist fracture) said he hopes to return with 30-40 games left before the playoffs.

UP NEXT

Marlins: RHP Jose Urena (10-5, 3.70) opens a home series against Colorado on Friday. He’s 1-0 with a 1.42 ERA in two career starts versus the Rockies.

Nationals: RHP Edwin Jackson (2-2, 3.75) pitches against San Francisco on Friday at Nationals Park. He’s 2-0 with a 2.92 ERA in his two most recent starts (in 2016) versus the Giants.