The first run Evan Longoria knocked in Thursday night made for a nifty, historic notation, the 500th RBI of his already-impressive career.

But the next two made more of a statement and a difference as he hit a pair of opposite-field homers leading off innings to help the Rays to an 8-3 victory over the listing Yankees.

"Two homers is better," Longoria said. "And the sooner I get to 200 home runs (he has 146), that will be cool. Keep adding those milestones up."

Longoria had help from an unusual lineup that featured Jose Molina as the designated hitter. Rookie Wil Myers singled and came around to score the first Rays run, Desmond Jennings and Sean Rodriguez hit back-to-back two-out doubles in the seventh for the most important run, and Yunel Escobar blasted a homer to center for the last two runs.

All that offense led to another success story as left-hander Matt Moore worked relatively crisply into the seventh inning, halting a three-game stretch in which he went 0-3 with a 13.86 ERA and winning for the first time in a month after his 8-0 start.

"That's what Matty looks like, or can look like, on a more consistent basis," manager Joe Maddon said. "And that's really big."

The win was only the Rays' fourth in their past 12 games, though it improved them to 38-35 and moved them within 1½ games of the third-place Yankees and five from the AL East-leading Red Sox.

Feeling better after a plantar fasciitis issue had limited him to DH duty last weekend, Longoria logged the 12th multihomer game of his career and moved onto the American League leader­board with 16, putting him on pace for a career-high 36.

As for the RBIs, well, he will take them, too.