Updated

DETROIT (AP) — Miguel Cabrera put on a show, hitting three homers in a game for the first time.

It wasn't enough.

Ben Sheets worked seven innings in his longest start of the season, Landon Powell homered and hit a sacrifice fly in the ninth for the winning run and the Oakland Athletics held on for a 5-4 win over the Detroit Tigers on Friday night.

"It was a great night for Miguel Cabrera," Detroit manager Jim Leyland said. "But it was not a good night for the Tigers."

Sheets saw to that, looking like he was worth the $10 million, one-year gamble the A's made in him after the right-hander missed last season because of elbow surgery. He has been solid in four of his last five starts after giving up 17 runs in consecutive outings.

"I'm starting to feel better," he said. "I still feel like I'm building some stamina."

Sheets gave up three runs — on Cabrera's first two homers — on five hits in his longest outing since tossing a five-hit shutout for Milwaukee against San Diego in 2008.

"One guy freakin' did a lot of damage for their team," he said. "That's why he's special."

Cabrera is hitting .341 with 13 homers and 44 RBIs over 45 games, the best start of his career at the plate.

He was playing for the first time since the birth of his second daughter on Tuesday. He had homers in his first two at-bats, and his third pulled Detroit within a run before Bailey retired three straight to end the game.

"We're here to win games," Cabrera said. "We're not here for personal numbers."

Brad Ziegler (2-2) gave up a hit in the eighth inning. Reigning AL Rookie of the Year Andrew Bailey didn't let Detroit do anything after giving up a leadoff homer to Cabrera for his 10th save in 12 chances and his team's sixth win in seven games.

Reliever Ryan Perry (1-4) gave up two runs and got just two outs, losing in a second straight game.

"He's fine," Leyland insisted. "I'm not worried about him."

Perry blew a 4-1 lead in Wednesday's loss at Seattle by giving up four runs and getting only one out. He was booed by some in the sellout crowd when he entered the game and the fans groaned when he was taken out.

Cabrera's homers were each impressive — no-doubt shots — while Oakland's key hits were simply effective.

"We have a scrappy team," A's manager Bob Geren said. "That's the way we've been winning. Everybody contributes."

Adam Rosales hit a bloop double with one out in the ninth, pinch-hitter Ryan Sweeney was intentionally walked and Perry plunked Mark Ellis on his back to load the bases.

Gross followed with an infield single, which reliever Fu-Te Ni had a chance to field, to score Rosales and Powell followed with a sacrifice fly, producing quickly after being recalled from Triple-A Sacramento on Thursday.

"Sometimes you don't hit the ball good and it turns out good," Leyland said. "Give them credit. They put it in play."

Detroit's Dontrelle Willis gave up three runs on nine hits and four walks over 5 1-3 innings. Armando Galarraga stranded two runners he inherited and pitched 1 2-3 innings of scoreless relief.

Willis overcame a rough start, getting out of a bases-loaded jam in the first by getting Jake Fox to hit into an inning-ending double play and then bounced back with three hits and an RBI. Willis stranded two in the fifth by striking out Gross, leading to Oakland leaving a season-high 13 runners on base.

"I threw myself into a hole," Willis said. "But I was able to keep it close."

NOTES: Cabrera, who hit two homers 15 times, became the first Tiger to hit three homers since Dmitri Young in 2005. ... Oakland has been over .500 for 37 days this year after having a winning record for only one day last season. ... Leyland says Carlos Guillen is his everyday second baseman, a position he hadn't played since 1999. He was reinstated from the disabled list on Friday. Detroit optioned infielder Danny Worth to Triple-A Toledo to make room on the roster. ... Willis, who is from Oakland, threw 107 pitches, his highest total since 2007 with the Florida Marlins. ... Leyland said he plans to stick with Galarraga as his starter Sunday.