DETROIT -- The Yankees didn't deserve many style points over the course of their nine innings on Wednesday, but after the way some of their recent games have been ending, an ugly win was probably just what they needed.
Surging to a seven-run lead after four turns at bat, the Yankees nearly gave it all back as a laugher morphed into a close game, then rode a late surge to outlast the Tigers in a sloppy 12-8 victory at Comerica Park.
"It's all about winning right now," Yankees outfielder Nick Swisher said. "That lead we've built up throughout the season is kind of shrinking a little bit. We need to do our best to put some W's on the board and make it a little more comfortable."
The Yankees maintained a 4 1/2-game lead over the Orioles in the American League East with just their seventh win in the last 19 games. While there have been some signs of concern, the Yankees have been able to avoid panic.
"We've got 162 games, and we know it's only August," Curtis Granderson said. "There's a lot of games to play, a lot of games in our own division to play, and I think everybody's just very realistic of knowing that the season doesn't end today."
Enjoying immediate results after being dropped to the No. 6 spot in the lineup, Granderson paced the Yankees' offense with four RBIs -- including a three-run homer, his 30th -- as Tigers starter Anibal Sanchez was thumped for seven runs in three-plus innings.
"He was having a night," Tigers catcher Gerald Laird said of Granderson. "I was in the dugout [thinking] like, 'Geez, he's hitting everything tonight.' Those guys are a pretty good ballclub. They have some pretty good hitters. If you don't get the ball down, you're going to get hit hard."
It should have been breezy for CC Sabathia, but Detroit's potent lineup chipped away at the ace left-hander, who was pulled with two outs in the seventh inning after throwing just 94 pitches.
David Robertson couldn't clamp the damage as the Tigers batted around in a four-run frame that featured a Casey McGehee error and two uncharged defensive lapses by Mark Teixeira, setting up three straight run-scoring hits.
The Yankees had not made an error in 13 straight games, their longest stretch since a Major League-record 18-game run in 2009.
"It's going to happen," Yankees manager Joe Girardi said. "It shows you that they're human, that's all. It doesn't happen very often, but we made a couple tonight and were able to overcome them."
New York struck back immediately in the eighth, as Teixeira notched a run-scoring single off former teammate Phil Coke and Eric Chavez added a hard-fought RBI groundout to offer breathing room.
Omar Infante hit a solo home run off Robertson in the eighth, but the Yankees added two more runs in the ninth, giving Rafael Soriano a four-run lead to work with in a non-save situation.
"We've been losing, so if anybody's comfortable with that -- I know I wasn't," Chavez said. "We had a nine-game lead two weeks ago, and that's gone. I just want to win. I just want to get back to the postseason, and I'd like to have the biggest lead we possibly can have to do it."
Sabathia said that he had been surprised to be lifted so soon, but Girardi explained that he had Robertson warm and wanted him to face the right-handed-hitting Delmon Young, who wound up beating out an infield single.
"You're always upset when you're not able to finish your inning," Sabathia said. "That's why Joe's the manager and I go out and throw the ball, but it worked out. I felt pretty good."
Sabathia's final line showed him allowing five runs (three earned) and eight hits. He has not lost in his last eight starts dating to June 7, and said the Yankees' recent struggles didn't influence his outing.
"I wish I could say, 'Yeah, I feel more pressure,' but I don't," Sabathia said. "I always want to go out and pitch deep into the game and give the team a chance to win, and I kind of did that tonight."
Both benches were warned in the third inning by home-plate umpire Tim Welke after Robinson Cano was drilled on the hip by Sanchez. Teixeira was also hit in the first inning, and Sabathia drilled Prince Fielder in the bottom half of the frame.
"They try to be proactive," Girardi said. "They try to make sure nothing happens, and I know that."
There was no disputing that the Yankees needed a slugfest like this one, with crooked numbers littering the scoreboard, and an output of 12 runs and 18 hits is generally a recipe for winning ballgames.
"Offensively, we did exactly what we're capable of doing," Swisher said. "We got hits all the way up and down the lineup, and when we're doing that, it usually ends up as a big win for us."
But Girardi didn't want to take any credit, despite his pregame decision to shuffle the lineup by moving Granderson out of the leadoff spot to utilize Derek Jeter and Swisher at the top of the order.
"I don't know. You can talk about moving hitters all the time," Girardi said. "We try to stay pretty consistent around here so guys know where they're at. I remember [on Friday] when we led off Granderson, he had two RBIs and everyone seemed to like that. Let's just hope this one scores a lot of runs for a while."