Walker Buehler did a better job handling the team he used to play for than Roki Sasaski did pitching against the team he decided not to play for.

Even if Buehler wasn’t given a chance to pitch for as long as he might have liked, the Padres made him a winner on the strength of Ty France’s three-run homer in the second inning, a four-run eighth inning and their bullpen shutting down the Dodgers over the final 3⅔ innings in a 7-1 victory Friday night at Petco Park.

The Padres won a fourth consecutive game for the first time since May 15 to 18. A 1-0 victory over the Dodgers was the fourth victory in that May streak. The Dodgers won the next two games in the series and the Padres would go into something a tailspin after that.

But Friday’s victory was their 10th in 16 games and it came on the heels of a sweep of the Braves, who arrived in San Diego with the major leagues’ best record, which is now property of the Dodgers.

“We’re playing good baseball against good teams,” France said on the field after the game for an interview on 97.3-FM. “We’ve just got to keep building off it each night.”

France ended up departing the game four innings after he was hit in the left wrist by a 99 mph fastball from Sasaki and shortly after he jammed the wrist sliding into third base in the eighth inning. Padres manager Craig Stammen said he would get X-rays and be evaluated Saturday.

France’s fourth home run in seven games and what has become Buehler’s standard start for the Padres got the job done Friday.

Buehler had allowed one run before he was pulled 74 pitches into his outing after he issued a one-out walk in the sixth inning.

“It just kind of got away from me a little bit,” said Buehler, who threw three balls at the start of the inning before eventually retiring Shohei Ohtani on a groundout. “Obviously competitively, I wish I could have made the pitches. But I kind of understand the decision. The misses got a little bit bigger, and back-to-back 3-0 counts isn’t the most confidence-instilling thing to a manager, so it is what it is.”

The Padres grounded down Sasaki, the right-hander from Japan who was considered the prize of the 2024-25 offseason. He had thrown 81 pitches when he was lifted two batters into the fifth inning in his first start against one of the teams he spurned to sign with the Dodgers.

Sasaki departed after Fernando Tatis Jr. doubled and Samad Taylor walked to start the bottom of the fifth.

Left-handed reliever Jack Dreyer came in and avoided further damage, just as Sasaki had been able to do the previous inning after the Padres loaded the bases with two outs.

Jackson Merrill grounded a ball to the right side that got Taylor forced at second base but moved Tatis to third. After Merrill stole second base, the Dodgers intentionally walked Machado.

But Gavin Sheets grounded a ball up the middle that shortstop Mookie Betts fielded before stepping on second and throwing to first to complete an inning-ending double play.

The Dodgers failed after having the same situation in the sixth.

After Andy Pages drew a one-out walk, Stammen walked from the dugout to replace Buehler with left-hander Yuki Matsui.

“He was pitching great tonight,” Stammen said. “Kept his pitch count down low, was throwing a lot of strikes. I think at the end I just felt like he went 3-0 on both those guys, and the middle of their order coming up was going to be pretty tough for him to navigate.”

Freddy Freeman doubled against Matsui on a fly ball to the corner that fell just short of the left field wall and just out of the reach of Taylor. The Padres intentionally walked Betts to bring up Max Muncy, who popped out before Kyle Tucker ended the inning on a fly ball to center field.

Jason Adam retired the Dodgers’ bottom three batters in the seventh and Adrian Morejón got through the top three in the eighth before Wandy Peralta closed out the game.

Friday was the fifth consecutive start in which Buehler allowed a single run, and he finished June with a 1.71 ERA in five starts (26⅓ innings).

That run came on the first pitch of the second inning, when Betts drilled a fastball at the top of the zone just beyond Taylor’s outstretched glove and into the left field seats.

Machado and Sheets walked to start the second inning, and France came up with one down and fell behind 0-2 before reaching down to send slider 372 feet where it landed 10 rows beyond the left field wall.

The Padres forced Sasaki to throw a lot of pitches, but they did not score off him again.

Machado’s double to the base of the wall in right-center field led to the Padres loading the bases with two outs when Sasaki hit France and walked Will Wagner before ending the inning with a groundout from Rodolfo Durán.

Their third time loading the bases, they capitalized. And they poured on.

Sheets’ one-out single got the big eighth inning going, and walks by Xander Bogaerts and France loaded the bases.

A single by Sung-Mun Song drove in two runs, a double by Durán and single by Tatis added the final two runs.

“You’re not always going to come through in every opportunity,” Stammen said. “But the more opportunities we give ourselves, the better chance we have of one of those kind of breaking through. And we did that in the last inning tonight.”