A night after putting an end to an eight-game slide, the Marlins had the Nationals right where they wanted them Wednesday — with a dominant Jose Fernandez on the mound protecting a three-run lead.

A pair of errors by catcher Jarrod Saltalamacchia, and more shaky relief work by the bullpen sent it all crumbling rather quickly.

First, Jayson Werth smacked the game-tying, three-run home run off Fernandez following those Saltalamacchia errors in the sixth. Then, the Nationals struck for three runs off Mike Dunn and A.J. Ramos in the eighth to complete a 6-3 come-from-behind victory in front of a paid crowd of 20,178 at Marlins Park.

Wasted in the defeat: a 465-foot three-run home by Derek Dietrich, and another quality start by Fernandez, who more than made up for his worst career outing for the Marlins last week by striking out 10 and surrendering only four hits over seven stellar innings. None of the three runs Fernandez gave up were earned.

Help us deliver journalism that makes a difference in our community.

Our journalism takes a lot of time, effort, and hard work to produce. If you read and enjoy our journalism, please consider subscribing today.

“When Diets hit that three-run home run that was a big lift. We just ran into that sixth inning,” Marlins manager Mike Redmond said. “I thought Jose was going to pitch himself out of that. He made some great pitches to [Anthony] Rendon and then he just made a mistake and the guy hit it out.”

Fernandez, still a perfect 11-0 at home in his career, was cruising through the first five innings. He gave up only one hit — a double off Dietrich’s glove at second by Danny Espinosa in the second — and retired 10 in a row after that before Jose Lobaton opened the sixth with a double to right.

Then the defensive mishaps began.

Nationals starting pitcher Tanner Roark laid down a sacrifice bunt right in front of Saltalamacchia, who had more than enough time to get Lobaton out as he was sprinting to third. But an errant throw forced Casey McGehee to backhand the ball and he was never able to turn and put a tag on Lobaton.

Moments later with runners on the corners and one out, Saltalamacchia went back against the netting behind the plate to catch a Rendon pop up. But the ball slipped out of his mitt as he tried to squeeze it. Rendon popped up to second for the second out, but Werth took advantage of Saltalamacchia’s mistakes when he crushed an 0-1 fastball from Fernandez barely over the wall in right-center field.

“It was an outside pitch. I checked to Salty and I got beat,” Fernandez said. “It’s part of the game.”

A fan reached over the railing to try and catch Werth’s blast, but the home run was reviewed and confirmed by replay.

The two errors in the same inning by Saltalamacchia were rare (he made six total last season for the Red Sox), but a continuing trend for the Marlins. Miami came into Wednesday’s game next-to-last in fielding with 14 errors. They are now averaging one a game after Saltalamacchia’s two errors.

Defense wasn’t the only problem. The bullpen, which gave up a string of late home runs during the team’s 0-6 road trip last week, picked up where it left off in the eighth.

Pinch-hitter Zach Walters opened the inning by smacking the second pitch Dunn delivered — a slider left up in the zone — over the wall in left field for a solo home run. The Nationals (9-6) sent six more hitters to the plate in the inning and plated two more runs when Ian Desmond sent out a two-out, two-run single through the whole in left.

“It was a terrible pitch and he hit it,” Dunn said. “The [first] pitch was a slider that missed in and he was able to get the timing off that. I threw the same exact pitch the second pitch. Can’t do that. You have to be able to make the adjustment and execute the pitch.”

Related stories from Miami Herald

The Marlins bullpen, stout for most of last season, is now 1-4 with a 4.26 ERA this season. They’ve given up seven homers — the same amount Marlins starters have — including five in the eighth inning or later over the team’s last eight games. Four have been game-winners.

Fernandez and Roark exchanged zeroes through the first three innings before Garrett Jones and McGehee led off the fourth with back-to-back singles.

Dietrich then drilled the longest home run of his career with one out, the ball bouncing off the face of the FedEx Express sign in the upper deck in right-center field.

It was the 97th time since Marlins Park opened in 2012 the home run sculpture was put in motion following a Marlins home run. The Marlins have six home runs this season at Marlins Park. They had 36 all of last season.