ST. PETERSBURG, Fla. - Evan Longoria was trying to tie the game with a long flyball against Scott Kazmir, his former Tampa Bay Rays teammate.

Instead, Longoria hit out a three-run homer that turned around Friday night's game in the fifth inning and led the Rays to a 5-2 victory over the Oakland Athletics.

"It was two strikes and I was just trying to put the ball in play," Longoria said. "The plan was just to drive the ball in the outfield and score one run, and we ended up getting three out of it. In a 1-0 game, it does change the complexion of the game."

Steven Souza Jr. and Tim Beckham added solo home runs for the Rays, who won for the fourth time in five games and remained in first place in the AL East.

Rays starter Chris Archer (5-4) and five relievers gave up nine hits, and Tampa Bay held an opponent to two runs or less for the 22nd time in 43 games. Archer gave up six hits, struck out eight and walked four in 5 1/3 innings for Tampa Bay.

"That's what's nice about playing on a good team: your teammates bail you out," said Archer, who has allowed one run or less in six of his 10 starts. "The fact that our bullpen is the best in baseball, that's comforting."

Brad Boxberger got the final out for his 13th save.

Kazmir (2-3) gave up two earned runs and eight hits in 5 2/3 innings for the A's, who lost their fourth straight and 14th of 16. The left-hander is 0-3 in seven starts since April 13.

"I was just trying to make a pitch, a fastball in. It ended up out over the plate and he made me pay," said Kazmir, who started Games 1 and 5 of the 2008 World Series for Tampa Bay.

"There's a lot of respect there, just going back as far as we have, and a lot of respect for what he's overcome," Longoria said. "Obviously, he was really, really good for a while here and then had some struggles, and now being back to the pitcher that he was is pretty impressive."

Stephen Vogt led off the fourth with his 10th home run, giving the A's a 1-0 lead.

Longoria's fifth homer came in the fifth after Brandon Guyer's leadoff hit and an error.

Souza's seventh home run, off reliever Evan Scribner in the seventh, made it 4-1 and Beckham, who had tripled earlier, added his fifth homer in the eighth off Arnold Leon. After the game, Beckham was optioned to Triple-A Durham and left-hander Enny Romero was called up to take his place on the roster.

Billy Butler drove in Oakland's final run with a sacrifice fly in the ninth.

BAD MEMORY

Cash caught Kazmir for one game when they were with the Devil Rays on July 3, 2005. "We lost 2-1 (actually 3-2) to Minnesota," Cash recalled Friday. "He wanted a slider; I walked out and said, 'Let's go with a fastball.' Groundball up the middle, run scores, we lose. Great memory. Lou Piniella was thrilled."

TRAINER'S ROOM

Athletics: RHP Edward Mujica went on the 15-day disabled list with a fractured right thumb. ... OF Coco Crisp will not have neck surgery, but the A's will decide this weekend whether to put him on the disabled list.

Rays: INF Ryan Brett (left shoulder subluxation) and LHP C.J. Riefenhauser (left shoulder inflammation) will begin rehab assignments at Class A Charlotte on Sunday.

UP NEXT

RHP Kendall Graveman (1-2, 8.27 ERA) will be recalled from Triple-A Nashville to pitch for the A's against Rays RHP Nathan Karns (3-1, 3.77 ERA), who will be pitching on 10 days' rest.