Updated

Justin Verlander refused to let his worst outing of the year get him down.

A comeback win for the Detroit Tigers helped lift his spirits.

Alex Avila's second homer of the game gave the Tigers the lead in the eighth inning and they held on for a 7-6 victory over the Tampa Bay Rays on Tuesday night.

"It wasn't a great night for me," Verlander said after allowing a season-high six earned runs. "It was a great night for the ballclub. I couldn't be more happy."

Miguel Cabrera hit a three-run homer in the fifth, giving him 34 RBIs this season, to help Detroit win its third straight game.

Avila hit a solo drive in the sixth off starter Wade Davis and a go-ahead, two-run shot off Cesar Ramos in the eighth.

"In order to be a championship team you've got to be able to come from behind and win one-run games and withstand that kind of pressure," Avila said.

Al Alburquerque (1-1) earned his first major league victory in his 14th appearance after getting two key outs in the eighth. He inherited a bases-loaded, one-out jam and got out of it by striking out Sean Rodriguez and getting Sam Fuld to ground into a fielder's choice.

Joaquin Benoit pitched the ninth for his first save against the team he pitched for last season, filling in for Jose Valverde because the Detroit closer threw 27 pitches Monday night.

"That's great tonic for him," manager Jim Leyland said. "I think he needed a little confidence. He's really good, that's why we got him. Sometimes you hit a bump in the road, sometimes you come to a place for the first time, a new contract and everything, you try to do too much.

"Hopefully, we can just get it settled in now where he's going to pitch the eighth and Valverde the ninth."

Leyland recently gave Benoit his job back as the Tigers' setup man.

"His confidence is back and my confidence is back," Benoit said.

Ramos (0-1) gave up hits to both batters he faced.

Davis allowed five runs — four earned — and eight hits over six innings.

"That was possibly as good as Davis has thrown all year," Rays manager Joe Maddon said. "The pitch that Cabrera hit out was well inside. There aren't too many guys in baseball that can get their hands inside that pitch and hit it out."

Tampa Bay has lost six of eight after building a season-high, three-game lead over the New York Yankees in the AL East.

"It has been a tough week," outfielder Matt Joyce said. "We've got to find ways to win these games."

Verlander avoided a loss despite getting roughed up more than he has in any start this season.

He allowed six earned runs — for the first time in more than a year — and a season-high nine hits while striking out a season-low two in six innings.

Joyce hit a two-run homer off Verlander in the fourth and kept the potential tying run off the basepaths by racing to make a basket catch deep down the right-field line and running into the wall in foul territory for the first out in the eighth.

Jhonny Peralta then drew a walk against Joel Peralta and scored when Avila homered on Ramos' second pitch.

"Ramos against Avila was exactly the matchup I wanted — and he just got us," Maddon said.

Verlander hadn't shown signs of being vulnerable this month. He threw his second career no-hitter a few weeks ago, had a two-hit, one-run outing in the following start and gave up three runs over eight innings in his previous outing.

He looked dominant early, retiring the first five he faced, before Rodriguez led off the third with a double and scored on John Jaso's groundout.

Johnny Damon led off the fourth with a single and scored on Joyce's eighth homer of the season. Joyce, a former Tiger, entered the game leading the majors with a .357 batting average.

The Rays scored three in the sixth to take a 6-4 lead.

B.J. Upton hit an RBI single, Joyce singled and scored on a throwing error by catcher Avila, and Joyce got hit on his right elbow by an errant throw from second baseman Scott Sizemore. Casey Kotchman followed with a sacrifice fly that ended up being the Rays' last run.

"Someone told me before the game that it was football weather, and I feel like I played a football game out there," Joyce said. "I hit my knee pretty hard on the wall, and took that throw off my elbow, but I'll be fine."

NOTES: Tampa Bay became the first team in major league history to avoid having more than one error in its first 49 games, according to statistics provided by the Rays from the Elias Sports Bureau. ... The Tigers put LHP Phil Coke on the 15-day disabled list with a bruised right ankle and plan to call up Andy Oliver on Saturday to take Coke's spot in the rotation against Boston. ... Tampa Bay's Elliot Johnson sat out after spraining his left knee in Monday's series opener and he might go on the disabled list Wednesday.