Updated

Brad Miller hit a pair of home runs and Dustin Ackley provided the go-ahead triple in the sixth inning to lead the Seattle Mariners past the Tampa Bay Rays, 5-4, in the first of a three- game series.

Miller, who only had two home runs in his first 38 career games, actually had his second multi-homer game. He did pick up his first career leadoff home run.

"He looked really good out there and swung the bat really well tonight," said Seattle interim manager Robby Thompson about Miller. "I thought he maybe had another one there in his last at-bat."

Erasmo Ramirez (4-0) earned the win despite giving up four runs on seven hits in 5 1/3 innings. He did strike out seven for Seattle, which won its second straight on the heels of four out of five losses.

Ben Zobrist also had a pair of home runs for Tampa Bay, which lost its sixth straight game.

Chris Archer (6-5), who only allowed three earned runs in 37 innings in July, continued to struggle in August. He gave up five runs on nine hits in five- plus innings. He has allowed 10 runs in 13 2/3 innings this month.

Miller crushed a low fastball to deep right-center field to open the game and give Seattle a quick lead.

Zobrist responded with his 100th career home run and first career leadoff blast in the bottom half of the first.

The Rays continued to jump on Ramirez. Matt Joyce and Evan Longoria followed with base hits. After Wil Myers grounded into a fielder's choice, James Loney plated Joyce with a single to put the Rays up, 2-1.

Seattle pieced together a two-out rally to regain the lead in the fourth. Raul Ibanez singled and moved to third on Michael Morse's ground-rule double. Justin Smoak hit a seeing-eye single off the glove of shortstop Yunel Escobar and past Zobrist, the second baseman, who were both playing on the right side of a shifted infield. Both Ibanez and Morse scored to put the Seattle up, 3-2.

The Mariners added a run in the fifth inning on Miller's second home run, a mammoth leadoff shot to the last row of the right-field seats.

Tampa Bay tied the game in the bottom half of the fifth. Kelly Johnson led off with a single and Zobrist followed with a home run to right field to tie the game at four.

Seattle quickly went ahead in the sixth. Smoak singled then scored when Ackley's triple off reliever Wesley Wright eluded Myers in center field.

"I just think he was not familiar with the wall," Rays manager Joe Maddon said. "In our ballpark it's kind of funky."

Oliver Perez and Yoervis Medina combined for 2 2/3 innings of scoreless relief before Danny Farquhar recorded his fifth save with a perfect ninth inning.

Game Notes

Farquhar has retired 28 of the past 30 batters he faced ... Smoak recorded a hit for the 11th time in 12 games. In that span, he owns a .364 average (16- for-44) with 10 RBI ... The Rays lost six straight games for the first time since they dropped the first six games of the 2011 season, from April 1-7 ... Zobrist recorded his third career multi-homer game and first this season ... Seattle went 1-for-10 with runners in scoring position and stranded eight ... Tampa Bay went 1-for-9 with runners in scoring position and left eight men on base.