BOSTON — Boston Red Sox reliever Brad Ziegler got his first matchup against his former teammates in a tight spot Saturday night – bases loaded and nobody out in the eighth inning.

Ten pitches and three strikeouts later, he walked back to the dugout with a three-run lead intact.

“I was doing what I could just to stay relaxed and calm on the mound,” Ziegler said after Boston beat the Arizona Diamondbacks, 6-3.

“Even warming up, seeing the scenario unfold, trying to not get the adrenaline too high. If it does, I tend to start missing with my pitches and not throwing them where I want. I was able to do that.”

Ziegler, acquired last month from Arizona, saved what could have been a rough inning after Matt Barnes walked three straight batters.

“He struck out the side in a crucial moment,” Boston Manager John Farrell said. “A big lift in that particular inning.”

Brock Holt hit a two-run homer and Sandy Leon had a solo shot for the Red Sox. Rookie Andrew Benintendi and Dustin Pedroia each had two hits and drove in a run for Boston, which won its second straight after losing 4 of 5.

Michael Bourn had two singles and an RBI for the Diamondbacks. They had won 4 of 5.

“Bases loaded nobody out, you’re down three and you want to at least get a couple there,” Arizona Manager Chip Hale said. “But he did a nice job. We’ve seen him do it (with us).”

Robbie Ross Jr. (2-2) worked an inning of relief for the win after starter Clay Buchholz gave up three runs over 4 1/3 innings in a spot start. Craig Kimbrel worked the ninth for his 19th save.

Archie Bradley (4-8) allowed six runs, four earned, in 5 1/3 innings.

Demoted to the bullpen twice this season, Buchholz made his first start since early July on the eve of his 32nd birthday because knuckleballer Steven Wright was scratched Thursday after jamming his pitching shoulder diving back into second during an interleague game.

Trailing 3-1 in the fifth, the Red Sox charged ahead with three runs that were keyed by right fielder Socrates Brito misplaying a flyball for an error. Leon hooked his homer around the right-field pole, Benintendi had an RBI double off the Green Monster after Holt reached on the error, and Mookie Betts’ grounder bounced over third baseman Jake Lamb for an RBI single.

Holt homered over Boston’s bullpen in the sixth to make it 6-3 and end Bradley’s night.

Arizona had moved ahead by scoring twice in the fourth and once in the fifth.

Buchholz held the Diamondbacks hitless until Bourn’s one-out single in the fourth. Bourn later scored on a groundout and Rickie Weeks Jr. added an RBI single, making it 2-1.

Bourn had an RBI single in the fifth.

NOTES: Red Sox second baseman Dustin Pedroia was back in the starting lineup after leaving Friday’s game because of flu-like symptoms. … Center fielder Jackie Bradley Jr. was out, nursing a sore big toe after fouling a ball off his foot a couple games ago and resting after playing 110 of the club’s 114 games. … Farrell said Wright threw again Saturday but “he’s not completely symptom-free and the next step will be Monday.