OAKLAND, Calif. (AP) -- Early in the season, Rich Harden had no margin for mediocrity. The Oakland Athletics couldn't score for the right-hander, and even one bad pitch could be impossible to overcome.
With the A's rocketing up the standings these days, Harden has the freedom to pitch as terribly as he did Friday night. His bullpen and his batters easily kept Oakland on track for another win.
Six A's drove in a run while building an early 7-1 lead against Sean Douglass (3-1), who couldn't escape the third inning in his first loss since joining the Tigers last month.
That support pleased Harden (9-4), who allowed a career-high 12 hits and four runs while laboring through 5 1/3 innings of poor pitch placement and bad breaks. In the third, he allowed his first earned run at home in a stretch of 24 innings since May 13.
"I got away with one today," said Harden, who got his fourth straight victory and seventh in eight starts since coming off the disabled list last month.
"I didn't have good stuff at all. That's probably the worst I've pitched since I've been here. It was overall just bad. ... The ball was basically right down the middle of the plate, every time," he said.
But Ellis' third homer of the season capped a four-run second inning for the A's, who have raced to the top of the AL wild-card standings by going 29-7 over the last six weeks. Oakland has won 12 of 15 since the All-Star break, pulling within 3½ games of the Angels atop the AL West.
Starting with Eric Chavez's leadoff double in the second, 11 of 13 Oakland hitters either reached base or drove in a run with a sacrifice fly. Rookie Dan Johnson finally chased Douglass with an RBI single in the third.
Oakland manager Ken Macha has become accustomed to his players' clutch hits and creative rallies.
"It's a team thing. In the beginning of the year, we had some great outings by our pitchers, and we didn't score any runs," he said. "Tonight, our offense picked him up. ... [Detroit] swings the bats, and they made us work for every out."
Placido Polanco had four hits and drove in two runs for the Tigers, who opened the weekend series with their third loss in four games despite hitting the ball hard all night. Detroit wasn't retired in order until A's reliever Kiko Calero did it in the eighth. The Tigers had 15 hits but stranded 12 runners.
"It's disappointing. We were a possible wild card, and this whole trip, we haven't played well," manager Alan Trammell said. "We got the hits tonight. We had opportunities early, but we were trailing too much. We were out of it after three innings."
Oakland tied a franchise record with three sacrifice flies from Chavez, Jay Payton and Jason Kendall. Johnson reached base four times, improving to 9-for-12 with four walks on the homestand, and scored two runs.
Harden allowed five hits and four walks in his last start at Texas, throwing 111 pitches in stifling heat. The A's thought about giving him an extra day to recuperate but instead kept him on a normal schedule.
Douglass and Harden had two of the AL's three lowest ERAs since June 25 entering the game, but both struggled. Douglass allowed seven runs and six hits, losing for the first time in six starts since joining the Tigers from Triple-A Toledo on June 22.
"When things are going bad, they go bad," Douglass said. "I just didn't make the pitches tonight, and I couldn't make any adjustments, and they weren't swinging at bad pitches. If I'm commanding the ball the way I have [in recent starts], they'd be swinging."
A's outfielder Mark Kotsay sat out his fifth straight game with a nagging back injury. Bobby Kielty started in left field and drove in a run before leaving in the third inning with a strained lower back. Keith Ginter played in the outfield for just the fifth time in his career. The A's won't know Kielty's status until Saturday. ... Detroit right-hander Chris Dingman was sharp in relief of Douglass, striking out four in 2 1/3 hitless innings. ... Justin Duchscherer, the A's All-Star reliever, struck out three in 1 2/3 scoreless innings. ... Magglio Ordonez's 20-game hitting streak was snapped.