Longoria hit a solo homer and drove in four runs to help the Rays beat the Texas Rangers 8-6 on Wednesday, completing a sweep of the three-game set between potential playoff opponents.
"We did it against a real good ballclub," Longoria said. "I think everybody at this point understands that these games are really starting to become big."
Longoria also had a pair of RBI doubles and a sacrifice fly. The All-Star third baseman had three RBIs in Tampa Bay's 10-1 victory Tuesday night.
"He had a great series," Texas manager Ron Washington said. "We couldn't stop him from the first game on."
Longoria had seven hits -- including five for extra bases -- in 12 at-bats with eight RBIs during the sweep. He entered the game hitting .234 over his previous 25 games.
James Shields (11-11) allowed two runs and four hits over seven innings, stopping a personal two-game slide. He had given up 12 runs over nine innings in his previous two outings.
"We're playing really well right now," Shields said. "We've got a lot of confidence at home. I think we've got that home-field advantage back."
The Rays have won 19 of their last 24 games at Tropicana Field.
Tampa Bay, which began the day tied with the New York Yankees for the AL East lead, has won five straight overall.
"Absolutely it's a confidence builder," Rays manager Joe Maddon said.
Taylor Teagarden and Mitch Moreland homered for the AL West-leading Rangers, who are 7-10 since July 30. AL batting leader Josh Hamilton had a run-scoring grounder in the eighth but went 0 for 4 for the day and 1 for 10 in the series.
"You just move on," Washington said. "We'll be better equipped the next time we see them. Stay tuned."
Longoria hit an RBI double off Derek Holland (2-2) in the first and a solo drive in the fourth for his first homer in 20 games, making it 2-0.
Joyce also singled in a run in the seventh and Longoria added a sacrifice fly in the eighth.
Teagarden cut the Rangers' deficit to 2-1 with a fifth-inning homer. He has connected three times in his last five starts.
Holland, recalled from Triple-A Oklahoma City before the game, made his first big league start since May 30. The left-hander gave up five runs and six hits in 4 1/3 innings.
"The big thing was I fell behind on a lot of hitters and you know that will cost you," Holland said.
Andres Blanco helped the Rangers close to 5-2 in the sixth, taking advantage of a pair of miscues by Shields. Blanco reached on an infield single and went to third when Shields was charged with an error for an errant pickoff attempt. He scored on a wild pitch.
The victory was the 900th for the Rays, who started play in 1998.
Shields has given up 29 homers this season. ... Rangers 3B Michael Young (stiff neck) was out of the lineup for the second straight game. ... Tampa Bay RHPs Jeff Niemann and Wade Davis, both sidelined with strained right shoulders, had bullpen sessions and will pitch simulated games Friday. ... Hamilton was the DH for the second consecutive game. "I want to get him off the (artificial) turf," Washington said. ... Rangers SS Elvis Andrus had a scheduled day off. ... Tampa Bay will wear team plaid jackets called "Braysers" as the theme for a West Coast trip that begins Thursday at Oakland. ... The Rangers optioned reliever Pedro Strop to Oklahoma City.