DETROIT — Brennan Boesch and the Detroit Tigers are on another streak, and this one is a lot more pleasant.

Boesch homered and drove in three runs, and the Tigers took advantage of some sloppy fielding to beat the New York Yankees for the third straight time, 6-3 on Thursday. Detroit had lost seven straight before taking the final three games of a four-game series.

“Hopefully it gives us some more confidence playing a team like the Yankees and beating them three out of four,” Boesch said. “I think we’re going to play with some momentum and some more passion, and get some wins on the road.”

Derek Jeter didn’t play for the Yankees, given the day off after leaving the previous night’s game with a right hip problem. His replacement, Eduardo Nunez, made two errors, including a high throw in the seventh that gave the Tigers two runs.

Detroit has had an up-and-down start to the season. The Tigers won four straight immediately before their seven-game skid. They’re now on the upswing again as they head to Toronto.

Rick Porcello (2-2) allowed two runs on eight hits in seven innings for the Tigers. He walked two and struck out three.

“To take three out of four from a team like that is a big lift,” Porcello said. “Especially off the two series we were coming off of. We needed these games, for sure.”

A.J. Burnett (4-2) held Detroit hitless until the sixth inning but made an error of his own that led to Detroit’s run in the first. He allowed five runs — only two earned — on three hits, striking out five with one walk in seven innings.

The Yankees led 2-1 in the sixth when Ramon Santiago hit a hard single to right for Detroit’s first hit. Santiago moved to second on a sacrifice, and Boesch’s two-out single up the middle tied the game.

Victor Martinez singled to start the seventh before Burnett’s control deserted him. He walked Magglio Ordonez, then hit Ryan Raburn, who was squaring to bunt. Brandon Inge put the Tigers ahead 3-2 with a sacrifice fly.

The Yankees nearly got out of the inning with no further damage, but Nunez threw high past first baseman Mark Teixeira on a routine grounder by Don Kelly, allowing two more runs to score.

“I feel comfortable fielding the ball, but I’ve made some bad throws,” Nunez said through a translator. “I have to keep working on that.”

Boesch’s solo homer in the eighth made it 6-2. It was Detroit’s fourth and final hit.

Boesch had a bizarre 2010, hitting .342 with 12 homers before All-Star break, then hitting .163 after it. He’s off to another nice start this season, hitting .318.

“It was pretty much a blur last year,” Boesch said. “I feel like I’m having better at-bats even now, so we’ll see where it takes me.”

Alex Rodriguez was supposed to have a chance to rest along with Jeter. Eric Chavez started in his place at third base, but Chavez fractured the fifth metatarsal in his left foot while running out a fourth-inning triple and had to come out of the game.

Rodriguez made a rare pinch-running appearance, then stayed in the game. According to STATS LLC, Rodriguez last pinch-ran in 1995 for Seattle in the decisive fifth game of the American League Division Series against the Yankees. He scored the tying run in the eighth inning of that game, which the Mariners went on to win in 11.

After Chavez’s RBI triple, Rodriguez came in and scored on Nunez’s single that put the Yankees ahead 2-1. The lead didn’t last, though.

New York had been the only American League team without a three-game losing streak.

Porcello has allowed two or fewer runs in each of his last four starts. He threw a career-high 120 pitches Thursday. Daniel Schlereth pitched the eighth, and Jose Valverde allowed a run in the ninth while closing the game out.

Burnett was impressive at times, erratic at others. He began the game by hitting Kelly with a pitch, and the Detroit center fielder went to third when Burnett threw wildly to first for an error on a pickoff attempt. Boesch’s sacrifice fly brought home the game’s first run.

Detroit managed only one baserunner for the next four innings, when Boesch reached in the fourth on an error by Nunez.

Notes: A fan jumped into the New York dugout during the sixth inning and was immediately apprehended and taken away. “I think he was trying to get onto the field, and thought he could clear the dugout, but he landed on the steps,” manager Joe Girardi said. “I have to applaud the security guards here, because they were right on him and had him cuffed and down the tunnel immediately.” ... Chavez’s triple was his first since 2007. ... The Yankees fell to 14-3 when leading after five innings. ... This was the seventh and last regular-season game between the Tigers and Yankees this season. ... Burnett hadn’t hit a batter before Thursday’s game after leading the majors with 19 in 2010.