The Rays trailed, 7-6, with two outs in the eighth when Carl Crawford singled off Cruz to bring Longoria to the plate. Facing a full count, the All-Star third baseman turned on a Cruz changeup and deposited the baseball into the left-field stands for his 18th homer of the season.
"We knew [Cruz] threw hard, and he's got good stuff," Longoria said. "I was just trying to hit a line drive up the middle and hoping that he would leave a fastball over the middle of the plate. And I got to 3-2 and I was looking fastball there, and he just so happened to leave a changeup in the middle of the plate."
By winning, the Rays remained 6 1/2 games behind the first-place Red Sox and 3 1/2 games behind the second-place Yankees in the American League East. In addition, the win got the Rays off to a good start on their 10-game road trip through Kansas City, Chicago and Toronto.
"We're going to have to win games late in the game, and we're going to have to win on the road," Longoria said. "This 10-game road trip could make or break our season. I think we need to look at it with a lot of urgency. We've got to go .500 or better. Things could go downhill in a hurry on this road trip, so I think we're off to a pretty good start."
James Shields started for the Rays and gave up four consecutive singles in the third before Mike Jacobs added a three-run homer to put the Royals up, 6-2. But the Rays' No. 1 starter didn't quit, which drew praise from manager Joe Maddon.
"It is so important [that Shields pitched the way he did]," Maddon said. "You really try to have every pitcher on the team understand once you give up a run that's all they're going to get. Once you give up the next run, that's all they're going to get, because if you do think that way, eventually you can come back."
The eight runs the Rays scored were the most in a Shields start since the Rays plated 11 on April 12 in Baltimore. Entering the game, the Rays were averaging 3.63 runs for every nine innings pitched, the third-lowest rate in the American League.
"First inning, I gave up one run; third inning, I gave up five runs," Shields said. "I just had one bad inning today. I thought I pitched well after that. When you give up six runs in three innings, all you can do is keep them in the game. And tonight was the story of last year. These guys did a great job of coming back, and I'm proud of them. We've been fighting all year to get this kind of win."
Shields avoided the loss to maintain his perfect career record (5-0) against the Royals, even though he allowed a season-high seven earned runs.
"He just wasn't as fine as he usually is," Royals right-fielder Mark Teahen said. "He was getting behind some guys, and we strung together a few hits in a row. They didn't get hit overly hard, but that Jacobs home run was huge with guys on."
Longoria's heroics would not have mattered had Pat Burrell not put forth a clutch effort of his own. The Rays DH connected for a two-run homer in the seventh off Jamey Wright that cut the Royals lead to 7-6.
"I know they have some really good people in their bullpen, the Royals do," said Maddon, "but I really liked the at-bats. ... We weren't chasing today."
Maddon said his team had a "good look" Friday night and added that he felt as though they were motivated to "get this thing done."
"To come back like that ... I thought it was a pretty big moment, and it is a great way to start the second half," Maddon said.