Rays starter Chris Archer had already hit two Blue Jays hitters when Longoria went to the plate in the eighth.
Blue Jays right-hander Marco Estrada retired Asdrubal Cabrera on a ground out to start the eighth before Longoria stepped in to hit.
Estrada cut loose with a 91-mph fastball for his first pitch that hit Longoria, who limped while making his way to first where he was met by Cash and a team trainer.
Longoria, who went to college with Estrada, believed he was hit intentionally.
"Marco and I went to school together," Longoria said. "We have a history of friendship. I don't have any hard feelings toward him. It escalated, and it looks a lot worse. ... But ultimately, I guess you have to protect your guys. And I'm sure he'll say it wasn't intentional, but he's only hit a handful of guys in a bunch of innings in the big leagues."
After a brief consultation, Longoria was lifted from the game. Longoria told reporters he had already begun to think about playing Friday night against the Yankees and wanted to get some ice on the area.
Following Longoria's plunking, Archer and Blue Jays left-hander Mark Buehrle were seen yelling at each other from their respective dugouts. In the bottom half of the inning, Rays pitcher Steve Geltz was ruled to have hit Josh Donaldson with a pitch after review, and Cash was ejected for arguing the confirmation of the call.