SAN FRANCISCO — Zack Littell’s last two walks off the mound at Oracle Park have not been happy ones.

Eleven months, three teams and a new role after publicly airing his grievances with manager Gabe Kapler last September, never to be seen in a Giants uniform again, Littell marched back to the visitor’s dugout in the sixth inning Tuesday evening after his shutout bid evaporated and his former club took a commanding lead in an eventual 7-0 win.

Littell, now a starter — not an opener — for the Rays, traded zeros with Jakob Junis and Sean Manaea for five innings, frustrating Kapler enough to get him ejected in the fourth inning, before the Giants’ long-dormant bats revved up to finish with seven runs on nine hits, one of their best showings since the trade deadline.

Thairo Estrada homered to left, breaking the scoreless tie, and Wade Meckler lined a single into center for his first MLB hit, bringing Rays manager Kevin Cash out with the hook. No protesting from Littell this time. But on the first pitch from new reliever Kevin Kelly, Wilmer Flores went yard, too.

It was the 10th time this season the Giants have homered multiple times in an inning — but their first since June 13, a drought that dates back about as long as their futility at the plate.

Estrada was moved to the nine-hole with the rookie Meckler, in his 94th game out of college, batting second for the second straight night in an attempt to will the Giants out of their prolonged funk. The effects of which had begun to take their toll on Kapler, who took out his frustrations on home plate umpire Chad Whitman.

Whitman’s third questionable strike call on Meckler in his first two at-bats, both ending in strikeouts, was the tipping point for Kapler, who began barking from the dugout, earning his second ejection of the season, before getting his money’s worth in a heated face-to-face exchange.

The Giants had lost five of their past six bullpen/bulk-inning games before getting some of the best work of the year from Junis and Manaea.

After surrendering a season-high 18 hits in the series opener, the tag-team duo combined to limit the Rays three hits Tuesday night over 7⅓ scoreless innings.

Recording called strikes or whiffs nearly half the time he threw his signature slider, Junis struck out a season-best seven batters. He took down the first four innings, throwing his most pitches since June 22 (62), before handing off to Manaea, who struck out five over 3⅓.