SAN DIEGO (AP)Luke Voit was one strike away from his third straight strikeout when he got a slider from Wil Crowe and drove it into into the seats in left-center to pull the San Diego Padres into a 3-3 tie with the Pittsburgh Pirates.

The three-run homer was a big moment for the designated hitter, who has mostly struggled in his first season with the Padres. Two innings later, Wil Myers drove in Manny Machado with a shattered-bat single and the Padres won 4-3.

The Padres’ slumbering offense finally came to life in the sixth and Voit punctuated it with his homer on a 2-2 pitch. It was his first since May 11 and third overall.

”I’ve been grinding and needed to step up,” Voit said. ”We’ve been struggling with runners in scoring position. It felt good, especially after my first two at-bats. I was just getting too big and I just need to slow the game down sometimes. This game’s already hard enough.

”Sometimes you’ve just got to take every positive out of this game. I finally got a big situation to come up and just slow the game down and look for a pitch that I knew I was going to get and I finally got it, so it was good.”

Voit said he knew that Crowe likely would follow up a sinker with a slider.

”I was kind of staying with that approach the whole time and it worked out,” Voit said. ”I just did my homework on him.”

The Padres hadn’t hit a home run since Machado’s solo shot in a 2-1 win at San Francisco last Saturday.

Jurickson Profar singled off Carlos Quintana leading off the sixth and Eric Hosmer reached on an error by first baseman Josh VanMeter. Hosmer was originally called out, but the Padres challenged and the call was overturned because although the throw beat Hosmer to the bat, VanMeter didn’t get his foot on the base. It was first ruled a single, but later changed to an error.

”We didn’t do a whole lot there for five innings,” manager Bob Melvin said. ”It kind of felt like the last couple of games we were a little dormant offensively. But it just goes to show you, you stay with it, you get a couple guys on base, and one swing of the bat by a guy like Luke can really turn the game around.”

Machado, who came in with an NL-best .357 average, started the winning rally with a leadoff walk against Duane Underwood Jr. (0-1) and took third on Eric Hosmer’s single to right-center. Myers brought in Machado with a single to center as his bat shattered.

Nabil Crismatt (3-0) pitched a perfect eighth for the win and Taylor Rogers pitched a perfect ninth for his 17th save.

The Pirates took a 3-0 lead against Manaea on Bryan Reynolds’ homer with one out in the first, his sixth, and Diego Castillo’s two-run double with one out in the in the fourth. Manaea walked Ben Gamel and VanMeter ahead of Castillo’s double.

Manaea allowed three runs and four hits in seven innings, struck out five and walked three.

UMP SWITCH

Second base umpire CB Bucknor jogged off the field during the top of the seventh and returned before the bottom of the inning wearing his protective gear and took over for plate umpire Jeff Nelson, who left the game. Melvin said Nelson had a bad back.

TRAINER’S ROOM

Pirates: 1B Michael Chavis left in the sixth with discomfort in his left forearm. … 1B Yoshi Tsutsugo was placed on the 10-day injured list, retroactive to Wednesday with a strained lumbar muscle. … INF/OF Tucupita Marcano was recalled from Double-A Altoona.

UP NEXT

Pirates RHP JT Brubaker (0-4, 4.64) and Padres RHP Joe Musgrove (5-0, 1.90) are scheduled to start in the middle game of the series. Musgrove pitched for the Pirates for three seasons before being traded to his hometown before to the 2021 season. The Padres have won all eight of Musgrove’s starts.

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