After a mystifying five-game skid that included a 26-inning scoreless streak, the new-look San Diego Padres finally played the way they're supposed to after last week's blockbuster trade that brought Juan Soto to town.

Manny Machado hit a game-ending, three-run homer and Soto connected for his first long ball with the Padres, who overcame a blown save by Josh Hader to beat the San Francisco Giants 7-4 on Tuesday night.

Machado capped the night in dramatic fashion with his one-out shot off Tyler Rogers (2-4), a half-inning after Hader allowed three runs to let the Giants tie it.

"We were looking for something to ignite our offense and our big boys got some big hits tonight," San Diego manager Bob Melvin said. "Certainly no more than Manny, who’s got a flair for the dramatic. We all know that. It was a good one to put away after looking like we had it in the ninth."

CLICK HERE FOR MORE SPORTS COVERAGE ON foxnews.1eye.us

Manny Machado celebrates

San Diego Padres' Manny Machado reacts after hitting a game-ending, three-run home run against the San Francisco Giants during the ninth inning of a baseball game Tuesday, Aug. 9, 2022, in San Diego.  (AP Photo/Gregory Bull)

The Padres started their winning rally when Jurickson Profar hit a one-out single off Rogers and Soto reached on catcher's interference. Machado then drove his 20th homer to left field and was welcomed by a wild celebration at home plate.

"We definitely broke that ice today offensively, defensively," Machado said. "Our staff as well. You know, we had a little hiccup in the ninth, but overall I think it was a good, productive day for us."

The Padres, whose offense looked miserable in two straight shutouts, had been 1-5 since acquiring Soto and Josh Bell from Washington. They hadn’t scored since the fourth inning Saturday at Dodger Stadium.

Hader blew the save in his first opportunity with the Padres, allowing three runs as the Giants tied it at 4 in the ninth. He walked in two and allowed Evan Longoria's tying sacrifice fly.

Profar, the left fielder, made a nice diving catch on Longoria's fly ball to save multiple runs. Hader faced seven batters and got just two outs on 37 pitches before making way for Tim Hill (3-0), who struck out Joc Pederson.

PIRATES' RODOLFO CASTRO HAS PHONE FALL OUT OF POCKET DURING THIRD-BASE SLIDE

Hader was trying for his major league-leading 30th save. The All-Star lefty was acquired from Milwaukee on Aug. 1, a day before the Padres landed Soto and Bell in that huge deal with the Nationals.

"You pick up your teammates," Melvin said. "Hader’s going to close plenty of games for us. Some things are kind of meant to be. We come back and pick him up. That’s what good teammates do."

Soto led off the fourth with a homer deep into the seats in right to tie the game at 1 and end San Diego's scoreless streak. He watched the ball sail out of the yard and threw his bat down while starting his trot. It was his 22nd this season.

"It was very exciting, a moment like that just to get the team going," Soto said. "It was real special for me."

It was also special that he did it at Petco Park, where fans have welcomed Soto as the jolt the Padres need with an eye toward October.

"Incredible. I love the energy they bring every day, so why not do it here?" Soto said.

Brandon Drury, obtained from Cincinnati last Tuesday, was robbed of a home run on a leaping catch by center fielder Mike Yastrzemski to end the inning.

WHITE SOX'S TIM ANDERSON EXPECTED TO MISS SIX WEEKS WITH TEAR IN LEFT HAND

Juan Soto and Josh Bell celebrate

San Diego Padres' Juan Soto, right, celebrates with Josh Bell after hitting a home run against the San Francisco Giants during the fourth inning of a baseball game Tuesday, Aug. 9, 2022, in San Diego. (AP Photo/Gregory Bull)

When the heart of the order came up in the sixth, Soto hit a leadoff double into the right field corner, advanced on Machado’s single to left and scored the go-ahead run on Bell’s single to center. Jake Cronenworth added a sacrifice fly.

Bell doubled and scored on Kim Ha-seong's ground-rule double in the eighth for a 4-1 lead.

Right-hander Joe Musgrove held the Giants to one run and six hits in seven innings while striking out four and walking none.

Musgrove allowed LaMonte Wade Jr.'s solo homer with two outs in the first, his fifth.

Giants starter Alex Cobb allowed three runs and six hits in five-plus innings, struck out seven and walked two.

TRAINER'S ROOM

Padres: SS Fernando Tatis Jr. hit a double, triple and walked twice in the third game of his rehab assignment with Double-A San Antonio. He had been scheduled to play CF but played SS because of slick outfield grass. The Padres anticipate the rehab assignment to last 7-10 days. He had his fractured left wrist surgically repaired in mid-March. ... C Jorge Alfaro should be able to avoid the injured list with the sore right knee that forced him out of Monday night's game, Melvin said.

CLICK HERE TO GET THE FOX NEWS APP

Juan Soto celebrates home run

San Diego Padres' Juan Soto gestures after hitting a home run against the San Francisco Giants during the fourth inning of a baseball game Tuesday, Aug. 9, 2022, in San Diego.  (AP Photo/Gregory Bull)

UP NEXT

Giants RHP Jakob Junis (4-3, 3.05 ERA) and Padres LHP Sean Manaea (6-6, 4.74) are scheduled to start the series finale Wednesday afternoon.