BOSTON – Cody Ross capped his four-hit return to Fenway Park with a tie-breaking homer Friday night that gave the Arizona Diamondbacks a 7-6 victory against the Boston Red Sox.

Ross, Boston’s regular right fielder last season, drove in three runs, doubled twice and singled once. His big hit came with the score 6-6 when he led off the seventh inning against Pedro Beato (1-1) with his seventh homer of the year.

In his only season with the Red Sox, Ross hit .267 with 22 homers and 81 RBI last year. But they let him leave as a free agent and signed Shane Victorino to take his spot in right.

On Friday, he doubled in the first, then singled in a run in the third, cutting Boston’s lead to 4-3. He hit another RBI double in a three-run fifth when Arizona went ahead 6-4. He finished his night by grounding out in the ninth.

Brad Ziegler allowed singles to Stephen Drew and Jacoby Ellsbury in the ninth but got his sixth save in six chances by retiring the last two batters.

The Red Sox had made it 6-6 in the sixth on Drew’s two-run homer, his eighth of the year, after a single by Mike Napoli.

Randall Delgado (4-3) got the win despite his worst performance of the season. He gave up six runs in six innings, the first time in his nine starts this year that he allowed more than three. He entered with a shutout streak of 142/3 innings after tossing the first shutout and complete game of his career in his last start, a 10-0 win over San Diego.

But he got out of trouble in the third when the Red Sox loaded the bases with one out but didn’t score.

Jon Lester of Boston also struggled after a solid stretch in which he posted a 2.29 ERA in his previous three starts. In his last start before Friday, he pitched seven scoreless innings in a 5-0 win at Baltimore. But against the Diamondbacks he allowed six runs and 11 hits in a season-low 41/3 innings.

Both teams got off to strong starts, each scoring twice in the first inning.

Paul Goldschmidt gave Arizona a 2-0 lead with his 25th homer after a single by Aaron Hill. Boston tied it in the bottom of the inning when Ellsbury tripled, then scored on David Ortiz’s 21st homer.

The Red Sox made it 4-2 in the second when Daniel Nava reached on a throwing error by shortstop Didi Gregorius, Jarrod Saltalamacchia doubled him to third, and Drew and Brock Holt hit sacrifice flies.

Ross’ RBI single scored Martin Prado, who doubled in the third. Then the Diamondbacks took a 6-4 lead with three runs in the sixth on RBI doubles by Prado and Ross, and a run-scoring single by Jason Kubel.

NOTES: Jack Peavy (8-4) makes his first start for Boston since being obtained from the Chicago White Sox when he faces Patrick Corbin (12-2) on Saturday night. Ortiz has reached base in 16 straight games. Gregorius struck out in all four at-bats. Lester didn’t issue a walk for the second time in three games.