DETROIT - DETROIT — It was a 10-day stretch against the Red Sox, Mets and Red Sox again that had a fairly equal mix of hanging by a thread wins, brutal losses and bullpen upheaval. It is not a stretch to say that Tuesday night, the Yankees got something they desperately needed: a laugher.

After a day off to catch their breath, they blasted the playing-out-the-string Tigers, 13-4, at Comerica Park on a rare drama-free evening.

“This was nice,” Joe Girardi said. “To be able to get a lead and continue to build on it . . . Really nice.”

Blistering-hot Gary Sanchez smashed his 24th and 25th home runs, including a 493-foot, two-run shot in a three-run first inning. It was the second-longest homer of the season, behind only Aaron Judge’s 495-footer against Baltimore on June 11.

“I think I’ve still got him by two feet,” Judge said with a smile when he was asked about Sanchez’s rocket.

Sanchez, who went 3-for-6, has four homers and 10 RBIs in his last five games and eight homers and 17 RBIs in his last 13. It’s a stretch reminiscent of late last season when he hit 20 home runs in 53 games.

“I think he was probably due,” Girardi said of Sanchez’s hitting in recent weeks. “That’s who he is. He has that ability to carry a club.”

advertisement | advertise on newsday

Sanchez, through his translator, didn’t jump at the chance to compare what he’s doing to last season.

“I feel pretty good right now,” he said. “I’ve been working pretty hard to improve and right now I’m getting really good results. It’s hard to compare it, I real ly don’t know if I feel the same way as last year. That was last year, but I’m feeling good right now.”

The offensive outburst helped Masahiro Tanaka, making his return from the disabled list, to cruise. Tanaka (9-10, 4.86) allowed three runs and six hits in seven innings, improving to 4-3 with a 3.09 ERA in his last 10 starts.

The Yankees (67-57), who remained 4 1⁄2 games behind the AL East-leading Red Sox, hammered tomato can lefthander Matthew Boyd for seven runs and seven hits in 2 1⁄3 innings, ending things early. They had 16 hits, getting three from Sanchez, whose homer in the ninth made it 13-3, and three from Todd Frazier, whose two-run triple in a four-run third made it 7-0.

Aaron Hicks had two hits, including his 13th homer, a two-run shot, and Didi Gregorius and Ronald Torreyes each added two hits. Judge, dropped to cleanup as Sanchez was elevated to third, was 1-for-1, walking in his first three plate appearances. His record strikeout streak ended at 37 games.

Yankees videos

“It was contagious today,” Frazier said. “Hitting was contagious. We’ll take that.”

The Yankees gave Tanaka a lead before he threw a pitch. Hicks, who was 7-for-45 since returning from the DL, including 1-for-19 on this trip, singled with one out off Boyd (5-7, 6.24).

Sanchez then launched a belt-high changeup to deep left-center for a 2-0 lead. Judge walked and went to third on a double by Gregorius. Tyler Austin’s sacrifice fly to centerfield brought in Judge to make it 3-0.

Tanaka struck out four and did not walk a batter. He allowed an inconsequential two-run homer in the seventh that brought the Tigers (54-70) within 11-3.

When asked about his slider, always a crucial pitch for him, Tanaka said through his translator: “I think it was good enough. I thought it could be better, but it was good enough to get through the game.”