DETROIT -- After several forgettable seasons, Alex Avila is putting together a year to remember.
Nick Castellanos drove in four runs with a double and a triple and Justin Upton drove in three with two hits while Daniel Norris (4-4) allowed two runs on six hits through six innings.
Norris was taken out after giving up a triple to right center by Mallex Smith plus an RBI single to Daniel Robertson to begin the seventh.
"We weren't getting the results but we were having good at-bats," Upton said. "That's all you can ask for. Alex kind of opened things up and we went from there."
Avila's 10th home run of the season came on a 1-2 slider that he drove the other way and over the left field wall for a 2-2 tie.
"Batting second, you can't swing at every first pitch every time," Avila said. "And you can't go up and take the first pitch every time. Usually when an inning like that happens, pitchers are making mistakes and you're hitting them.
"Sometimes you get a bloop or a misplay that keeps the inning going."
Erasmo Ramirez (3-2) gave up a leadoff home run to Ian Kinsler but then set down nine straight batters before Avila's home run knocked down the barrier. Kinsler's home run was his fifth of the season, third leading off a game and 43rd of his career, putting him sixth all-time on that list.
"Their bats just came to life," Tampa Bay manager Kevin Cash said. "They had a lot of hard-hit balls. He just threw too much over the white (of the plate). We like our pitchers to attack, attack, attack.
"And obviously there's a fine line in there, especially against some of these hitters that can hit the ball really hard. Looked a couple pitches were up in the zone and a couple, from the Jumbotron feed, looked middle, middle."
Once manager Brad Ausmus plucked Norris from the game, Warwick Saupold came in to throw a double play grounder. He also worked the eighth, with Daniel Stumpf pitching the ninth and giving up a run on a sacrifice fly to center by Robertson. Norris struck out eight and walked one.
The Tigers exploded for five runs in the fourth to take a 6-2 lead and added five more in the fifth for an 11-2 margin. Ramirez gave up nine hits in 4 2/3 innings with two walks (one intentional) and two strikeouts.
Miguel Cabrera walked after the Avila home run and J.D. Martinez singled to right. Upton lined an RBI double to center and Castellanos lined a two-run double to extreme left. James McCann added a sacrifice fly.
Upton got the scoring started in the fifth with a two-run double to left. Austin Pruitt relieved and two runs scored on a two-out throwing error on a ground ball to short by McCann while Jose Iglesias grounded an RBI single to drive in the last of three unearned runs in the inning.
Castellanos hit his two-run triple with two out in the sixth to make it 13-2.
"Avila comes up and hits the home run to lead that inning off. Then a four-pitch walk to Cabrera," Cash said. "That's a little telling to me. The hard hits are going to happen. We got to avoid that walk to extend the inning and allow Martinez, Castellanos, and Upton all those guys come up there to bang."
The Rays tied the score, 1-1, in the third when Peter Bourjos tripled to right and scored on a fielder's choice grounder to third by Steven Souza Jr. when Castellanos threw wildly to the plate on the play.
Logan Morrison walked to start the fourth and scored on singles by Smith and Robertson off Norris, giving Tampa Bay a 2-1 lead.
Smith tried a steal of home in the fourth but his lead was too short and he was thrown out 1-3-2.
"I'm fine with that," Cash said. "Looking back on it, ideally, he's thinking along with the game. We got a 2-1 lead doing everything we can to extend it, make it 3-1.
NOTES: SS Tim Beckham returned to Tampa Bay's starting lineup Friday night after missing most of three games with a sore right knee. He entered as a pinch-hitter Thursday night in the eighth. ... Detroit placed DH Victor Martinez on the 10-day disabled list Friday with irregular heartbeat, bringing up C/1B John Hicks for the third time this season. ... The Rays' top draft choice, 1B/LHP Brendan McKay of Louisville, was named recipient of the Dick Howser Trophy honoring him as the nation's top collegiate player. ... Miguel Cabrera served as the Tigers' DH in the absence of Victor Martinez but manager Brad Ausmus indicated he'll use C/1B Alex Avila and RF J.D. Martinez in that role, too.