SAN DIEGO -- Defending a one-run lead against the heart of the Miami Marlins' order, Huston Street turned the ninth inning at Petco Park into a chess match Sunday afternoon.

The Padres closer won, recording his 11th save as San Diego held off Miami 5-4 for a third consecutive win over the Marlins.

"There was a little crisis at the end of that one," manager Bud Black said after his club took a 5-0 lead into the eighth only to see the Marlins score four runs and strand the tying run at third.

Miami then loaded the bases with two out in the ninth against Street before the right-hander got second baseman Jeff Baker to ground out to short to end the game.

"Huston knows how to work his way through an inning," Black said. "He knew what he had to do."

And that was to avoid right fielder Giancarlo Stanton and third baseman Casey McGehee.

"I saw the statistic, those two guys are driving in more than 40 percent of their runs," Street said. "I didn't want them to beat me."

Miami pinch hitter Marcell Ozuna opened the ninth with a single, and he was forced out a grounder by center fielder Christian Yelich. After left fielder Reed Johnson flied out, Yelich was on first with Stanton coming up and McGehee in the on-deck circle ahead of Baker.

Street pitched around (and walked) both Stanton and McGehee to load the bases before getting Baker.

Street's ninth was a strategic if not cosmetic success.

"I knew what I was doing," the veteran closer said. "Stanton wasn't chasing the slider, and I wasn't going to give in to a special player in a special spot. I don't like walking anyone to put the tying run on second, but Stanton is Stanton."

That brought up McGehee with two on and two outs. Street fell behind after missing with a couple of sliders. That is when he took a look a deep look at the situation. Marlins manager Mike Redmond already had deployed his other two infielders as pinch hitters.

"Baker had to hit," Street said. "He's a good hitter with punch, but he's used mostly against left-handed pitchers (like Padres starter Robbie Erlin).

"Walking McGehee wasn't in the original plan, but when I'm behind in the count and Baker next, the tactical thing to do was pitch to Baker with the bases loaded."

One grounder later, the Padres had their first three-game winning streak of the season.

The Padres took a quick 1-0 lead when center fielder Will Venable opened the game by drilling the second pitch from Henderson Alvarez 400 feet for the franchise-record, 10th game-opening homer of his career.

The Padres extended their lead with four runs in the bottom of the fourth.

Shortstop Alexi Amarista made it 2-0 with a run-scoring single. Right fielder Chris Denorfia doubled the margin with a bases-loaded, two-out, two-run single. Left fielder Seth Smith drove home the Padres' final run with the fourth single of the inning.

Meanwhile, Erlin (2-4) was throwing 6 1/3 shutout innings. He allowed five hits and no walks while equaling his career high with seven strikeouts.

Padres pitchers set a franchise record for strikeouts in a three- or four-game series with 48 while winning three of the four games against the Marlins, who are now a major-league-worst 3-13 away from home.

"We're being tested on the road," Redmond said. "We just came off a really good homestand (8-1). We've got to get going on the road."

The Marlins continue their 10-game West Coast trip with four in Los Angeles against the Dodgers ahead of three in San Francisco against the Giants.

San Diego went 5-5 in the homestand that ended Sunday.

The Padres scored 24 runs on 35 hits over the past three games after scoring only 92 runs (2.3 per game) while hitting .215 through the first 36 games of the season.

Third baseman Chase Headley opened the fourth with a single and moved to second when first baseman Yonder Alonso drew a walk to reach base for the eighth straight time (he singled in his next plate appearance to stretch the streak to nine). Amarista then singled home Headley.