WASHINGTON -- As the game came to end, Trea Turner followed Bryce Harper back to the first-base dugout as the two did high fives with teammates who did not play.
Turner is about a week away from the first postseason experience of his major league career, and the speedy product from North Carolina State is fine tuning his game in the final days of the regular season.
"I am excited to get going in the whole playoff situation," Turner said.
Earlier in the day, the Los Angeles Dodgers lost 3-0 in San Francisco to the Giants. That means Washington (94-67), with a better record than the Dodgers (91-70), host Games 1 and 2 -- and Game 5 if necessary -- of the National League Division Series beginning Friday.
"It is definitely huge. We wanted to get the homefield advantage and we got it," Roark said. "You want to start off at home. It is always good to be in front of your home fans."
Turner, just over two years removed from college, said it was not an ideal comparison but he likened the major league playoffs to taking part in the College World Series.
"Every pitch of those games was pretty intense," said Turner, who is hitting .342 after going 2-for-3.
The Nationals fan cheered when the Dodgers finale went up on the scoreboard in the bottom of the seventh.
Chris Johnson had an RBI single in the sixth inning to pull the Marlins within 2-1. That ended the day for Roark (16-10, 2.83 ERA), who gave up three hits and one run with four walks and four strikeouts in 5 2/3 innings.
"I feel like I figured a couple of things out near the end (of the season)," Roark said.
Blake Treinen came on with two outs in the sixth and fanned Destin Hood, his former teammate in the Washington farm system, with a runner on base to end the threat.
Turner hit a solo homer -- his 13th home run of the year -- to give the Nationals a 2-0 lead in the fifth. The homer came off Wei-Yin Chen (5-5) as the Miami bullpen began to get loose behind the left field fence.
"I believe he will be a huge impact," Roark said of Turner in the playoffs. "He is a great player. He plays hard day in and day out. He is a huge competitor."
Harper, after striking out four times Friday, had an RBI single in the first to give the Nationals a 1-0 lead. He drove in Turner, who led off with a single and took second on a groundout.
Shawn Kelley pitched a scoreless seventh for the Nationals. Closer Mark Melancon came on with two outs in the eighth and got the final out. He then set down the side in the ninth for his 16th save with Washington and 46th overall this year.
Chen, capping a poor season while throwing 80 pitches, gave up two runs, six hits and one walk with five strikeouts in five innings. He ended the year with a 4.96 ERA.
"Wei-Yin threw the ball good," Marlins manager Don Mattingly said. "We just didn't come up with the hits. He was able to bounce back" after being on the disabled list.
Dustin McGowan took over in the sixth for the Marlins.
Michael A. Taylor and Danny Espinosa had two hits for the Nationals, who are 49-31 at home this year and 50-25 against the NL East. Washington had lost its previous three games decided by a run.
The Nationals had not won a one-run game since beating the New York Mets 1-0 on Sept. 14 in a game started by Roark, who won 15 games in 2014 in his first year as a starter.
The loss means the Marlins (79-81) will finish with a losing record for the seventh year in a row. Miami is 39-41 on the road with one game left.
Chen ended the year hitting .000 in 44 at-bats with no walks. He does not have a hit in 50 MLB at-bats. He was not the only Miami player who produced little offense, as the Marlins had four singles.
"We were not able to do much," Mattingly said.
NOTES: Washington LF Jayson Werth was not in the starting lineup after he left Friday's game in the seventh inning with back tightness. The Nationals are taking a cautious approach with Werth and INF Daniel Murphy (strained buttocks muscle), who also was not in the starting lineup. ... RHP Max Scherzer (19-7, 2.82 ERA) will face Marlins RHP Tom Koehler (9-13, 4.15) on Sunday in the regular-season finale. Washington OF Bryce Harper has six career homers against Koehler in 30 at-bats. ... The Nationals have three players who grew up near Miami: LHP Gio Gonzalez, OF Michael A. Taylor and CF Trea Turner. ... Marlins OF/baserunning coach Lorenzo Bundy is from Tappahannock, Va., and starred at James Madison University in Harrisonburg, Va. He was the Triple-A manager of the Los Angeles Dodgers affiliate from 2011 to 2013.