All of the components needed for winning baseball fit into a complete, tidy package for the Washington Nationals on Sunday afternoon. First they got a scoreless outing from starter Paolo Espino. Then came timely hitting throughout the order, including a towering home run by Juan Soto.

And in an uncommon development, the final piece to a 3-0 victory over the Colorado Rockies came courtesy of the bullpen, consistently maligned this season but up to the task in this instance to salvage the finale of a three-game series at Nationals Park.

Washington ended its three-game losing streak with its first shutout in more than three months. The previous time the Nationals (61-88) won in such a fashion was June 18 — when the playoffs were still an organizational aspiration.

Six of Espino’s seven strikeouts over 5⅔ innings came on fastballs topping out at 90 mph, underscoring command that allows the right-hander to get hitters to swing and miss despite modest velocity.

“I think everything was working pretty good,” he said after collecting his first win since Aug. 27. “Being able to spot my fastball when I needed it, and the off-speed also worked really good. Every time I’m locating my fastball, I think everything else works even better.”

Espino has allowed just one run over his past two starts. He has pitched at least five innings in each of his past five starts, allowing more than two runs only once in that span.

“It’s all about location, location, location with him,” Manager Dave Martinez said. “He understands how to pitch. He studies hitters. He knows when he can elevate fastballs. He knows when to go down and away on fastballs, so he did that today.”

Espino reached a milestone in the Nationals’ third win in the past 10 games: He surpassed 100 innings, now checking in at 102⅔. Entering 2021, he had never thrown more than 24 in a season during a major league career that began in 2017 with the Milwaukee Brewers.

Espino, 34, debuted with Washington in 2020 after starting the pandemic-shortened season at the club’s alternate site; he made two appearances, with one start, and pitched six innings. He spent the previous season pitching for Class AAA Fresno.

All of that makes his path to being a reliable back-end starter all the more improbable.

“Hey, I love him,” said Martinez, who compared Espino to former Nationals pitcher Aníbal Sánchez. “I was talking to [bench coach Tim Bogar] about how good he’s been for us and what he means to our club. He keeps guys off-balance. He’s great in the clubhouse. He’s been awesome for us this year.”

Five relievers backed Espino — most notably Tanner Rainey, who was recalled Saturday from Class AAA Rochester. In his first appearance since Aug. 12, the hard-throwing righty struck out the side in the seventh, combining fastballs in the mid-90s with a sharp slider.

Kyle Finnegan worked the ninth for his 10th save, issuing a leadoff walk to Ryan McMahon before striking out Sam Hilliard and inducing a Raimel Tapia grounder to shortstop Alcides Escobar, who stepped on second base and threw to Josh Bell at first for a game-ending double play.

Colorado (70-79) had briefly threatened in the eighth off Mason Thompson, but even those hits were somewhat hard luck. A catchable two-out double by Charlie Blackmon landed in front of charging left fielder Yadiel Hernandez’s glove when center fielder Lane Thomas appeared in better position to make the play. Trevor Story then singled when the ball dribbled toward third base but did not draw a throw from Carter Kieboom. Andres Machado replaced Thompson and struck out C.J. Cron to end the inning.

Hernandez had put the Nationals ahead for good in the first inning with an RBI single, and Luis García drove in the final run with a single in the sixth.

“They threw the ball really well today,” Martinez said of his beleaguered bullpen. “We’ve been asking them to do different things, different roles. The biggest thing is, I just constantly stay on them about attacking the strike zone, and they were really good today.”

So, too, was Soto’s majestic blast in the third inning off Rockies starter Jon Gray. His 26th homer traveled 454 feet to center, making it one of the longest hit at Nationals Park and Soto’s first since Sept. 8.

Soto went 1 for 4 and is hitting .315 in pursuit of a second straight National League batting title. He’s locked in a race separated by percentage points with two former teammates: Trea Turner of the Los Angeles Dodgers and Bryce Harper of the Philadelphia Phillies.

“You try to keep your mind away from it,” Soto said. “You just try to come out and play and have fun, but there’s always the comments. The comments always are going to come to you. Everybody, all my teammates, they’re just wishing me the best for that. You can’t just not look at it, so yeah, I’ve been following it, tracking it.”