SAN DIEGO (AP)Manny Machado did what he’s done all season in helping to carry the San Diego Padres.

Matt Beaty helped out, too, which came as a relief to the four-year veteran who has struggled with his new team.

Machado got another big hit for the Padres, and Yu Darvish pitched seven strong innings in a 3-2 victory against the skidding Miami Marlins on Friday night.

Machado reached base three times and had two hits, including a critical RBI single as the Padres won for the fourth time in five games while handing the Marlins their sixth straight loss.

The star third baseman gave San Diego a 3-0 lead with his two-out single in the fifth. That run proved to be huge after Darvish gave up Jesus Aguilar’s monster two-run homer to left field in the sixth. It was Aguilar’s third of the season.

Machado lined out to left with two runners on to end the seventh, keeping it a one-run game.

Eric Hosmer and Machado, who led the majors in batting average coming in, combined for San Diego’s first run, sandwiched by three strikeouts from Miami starter Sandy Alcantara in the first. Machado drew a two-out walk and scored on Hosmer’s double to right-center.

The Padres made it 3-0 in the fifth. Trent Grisham hit a leadoff triple and scored on Beaty’s double to right field. Machado’s two-out single brought in Beaty and chased Alcantara.

Hosmer and Machado have carried the Padres in the absence of star shortstop Fernando Tatis Jr., who is out until at least mid-June with a broken left wrist. The Padres are waiting for other starters to heat up.

Beaty, obtained during spring training from the rival Los Angeles Dodgers, came into the game hitting just .086. It was his first RBI of the season.

”It felt great,” said Beaty, who lined his double past Aguilar at first base. ”When I hit it I thought he was going to catch it, honestly. But it got past him and it felt good.”

Padres manager Bob Melvin said it was ”a huge hit” for Beaty.

”He’s had some at-bats that have been really frustrating for him and then you start to press a little bit, maybe try a little too hard, so that at-bat goes a long way for him because he really can hit,” Melvin said.

Melvin said he’s trying to be optimistic even thought it’s just been Hosmer and Machado carrying the offense.

”We’re getting a lot of wins and not getting a ton of production,” Melvin said. ”Those guys are carrying the load but you know a lot of these guys have track records. In the meantime we’re fighting hard, we’re playing clean games defensively, we’re getting well-pitched games and winning by a run here the last couple of nights.”

Darvish (3-1) allowed five hits in his longest outing of the year. He struck out three and walked none. The 35-year-old right-hander has gone at least six innings in five of his six starts.

Coupled with Nick Martinez’s seven innings in Thursday night’s 2-1 win, it’s the first time this season Padres starters have gone seven innings in consecutive games. They did it just once last year, when Darvish and Blake Snell accomplished the feat Aug. 7-8 against Arizona.

Rookie reliever Steven Wilson pitched the ninth for his first career save, allowing the first two batters to reach before retiring the side.

Alcantara (2-2) permitted three runs and five hits in 4 2/3 innings. He struck out five and walked two.

UP NEXT

Marlins RHP Pablo Lopez (3-1, 1.61 ERA) starts the third game of the series Saturday night against LHP Sean Manaea (2-2, 3.60).

More AP MLB: https://apnews.com/hub/mlb and https://twitter.com/AP-Sports