Stephen Strasburg smacks a single to drive in two runs in the second inning. (Jonathan Newton/The Washington Post)

Stephen Strasburg’s up-and-down month can, in part, be attributed to youth. The Washington Nationals’ ace can produce magnificence on the mound and he can, of course, falter, too. He can make batters look foolish, and he can struggle to adjust when his pitches aren’t sharp. Lest Nationals fans forget, he has made only 39 starts over three seasons, and he still has something to learn about the art of pitching.

Strasburg shook off his worst start of the season — perhaps of his career — with a dominant six-inning, three-hit, six-strikeout performance Sunday in a 4-1 win over the Miami Marlins at Nationals Park. His control and feel of his pitches were far better than they had been in the Nationals’ 8-0 loss to the Philadelphia Phillies on Tuesday, and he pounded the strike zone with his fastball.

In Sunday’s series-closing game, teammates noticed that he was angrier, more focused and “had a little fire today,” as first baseman Adam LaRoche put it.

“He acted like he had something to prove today,” outfielder Jayson Werth added. “He pitched really good. I like that Strasburg.”

The Nationals claimed the series from the Marlins, winning three of four and maintaining their three-game lead over the Atlanta Braves in the National League East. They set a new high-water mark for the season, and for any Nationals team since baseball moved back to Washington, moving to 22 games over .500 at 65-43. They took advantage of a bottom-dweller in the division and moved on to potentially do the same against the Houston Astros.

They do so with their top starter, Strasburg, back on the right track, and with their hottest hitter, LaRoche, continuing his torrid pace. The Nationals scored all their runs in the second inning on two-run singles by Strasburg and LaRoche.

Strasburg pumped fastball after fastball at Miami’s hitters, using it to set up his curveball and his punishing change-up. He challenged hitters to catch up to it, hitting 97 mph even in his final innings. He made it dance all over the strike zone. He struck out six batters, including two on his change-up and two on his curveball after setting them up with fastballs.

Strasburg extended his scoreless streak against the Marlins to 21 innings. Only four runners reached base.

Strasburg said he was pleased by the performance after giving up six runs in four innings last week against the Phillies, but he played it down as a moral victory. “I need to prove something every single day,” he said.

This wasn’t the first time Strasburg followed up a sub-par outing with a strong start this season. Over the past month, he has mostly alternated between the two, unable to win consecutive starts since June 20. When he loses command and the feel of his pitches, he tries to overcompensate. When he gives up a hit, he can hurt himself by trying to make a perfect pitch.

Manager Davey Johnson said it sometimes takes talented pitchers as long as three years to master the art of pitching in the major leagues. “He’s just learning about himself and learning about the league,” Johnson said. “It’s just a process they go through.”

Strasburg’s inexperience showed in the fifth inning, when he walked Donovan Solano on four pitches and was headed toward the same fate with John Buck. Pitching coach Steve McCatty came to the mound. He reminded Strasburg to settle down, breathe and forget about making the perfect pitch.

“I started to feel myself really get in a groove and I got a little too excited I guess,” Strasburg said.

He regrouped and mowed down Buck with consecutive called strikes and a curveball for a swinging strike. This was the kind of moment, a small bounce-back, that Strasburg understands he needs to repeat more often. When pitching to contact, a hit may happen, and it’s about learning to look past it.

“I’m still learning how to pitch and call a game and really pick up on little things that happen in the game that you can really use to your advantage,” he said. “Today was a big step forward for me in that process. But there’s still a long way to go.”

While fans have come to expect brilliance from Strasburg when he is on the mound, he also is becoming a growing attraction at the plate. With Werth and Danny Espinosa on base in the second inning, Strasburg smacked a curveball from Marlins starter Ricky Nolasco into right field, scoring two runs.

One of the game’s most exciting pitchers is also the best-hitting pitcher in the majors. Strasburg is hitting .343 (12 for 35) with seven RBI, more than some bench players who have dozens more at-bats.

Johnson said a player suggested that Strasburg be used a pinch hitter when he is shut down later this season because of a yet-to-be-determined innings limit tied to his recovery from elbow surgery. But Johnson, as he has before, laughed it off: “Highly unlikely,” he said.

Strasburg said he couldn’t explain his hitting success. Asked if he could pinch-hit, he brushed off the idea but marveled at his growth as a hitter. “They’re starting to pitch me more like a hitter, which, I mean, is kinda cool because they respect me more at the plate,” he said.

The offense chugged along with Strasburg and LaRoche. Rookie Bryce Harper, mired in his longest slump, went 2 for 4, but slammed down his bat after a fourth-inning strikeout, splitting it in half and drawing a gasp from the crowd.

LaRoche added to the Marlins’ misery in the second. He smacked a single up the middle to drive in two runs and give the Nationals a 4-0 lead. In this four-game series, LaRoche drove in seven runs. He has carried the offense through its injuries and slumps, re-establishing himself as one of the league’s best power-hitting first basemen.

He missed 118 games last season because of surgery to repair a torn labrum in his left shoulder. This season, LaRoche is leading the team with 23 home runs and 71 RBI.

Drew Storen pitched a scoreless ninth to notch his first save of the season, and the Nationals and Strasburg picked up another win.

“It’s good to see him back on the mound with that fire again and blowing people away,” LaRoche said. “That’s what he can do and as long as he believes in it, he can keep doing it.”