Hernandez (11-5) struck out the side in the sixth and eighth innings. He struck out Desmond Jennings to open the ninth, got Jeff Keppinger to ground out and completed the perfect game with a called third strike of Sean Rodriguez.
It was 23rd perfect game in major league history but the first for a Seattle pitcher in franchise history. It was the second perfect game this season at Safeco Field, however, as Chicago's Phil Humber beat the Mariners 4-0 by facing just 27 batters.
"When Phil threw his perfect game here I said 'I have to throw one'," Hernandez said. "I've been working to throw one and here it is."
The right-handed ace said he was aware of what was going on.
"I realized in the third or the fourth," he said. "It was in my mind the whole game. I was like, 'Come on, you've got to do it, you've got to do it. When I came out in the ninth, I was a bit nervous."
There have been five no-hitters this season, including one turned in by Seattle six pitchers versus the Los Angeles Dodgers June 8. That was also a 1-0 victory.
The Mariners managed just five hits themselves. Two came in the third inning when Seattle scored the game's run.
Brendan Ryan led off the inning with a single and Rays' starter Jeremy Hellickson (7-8) got the next two batters out. But Ryan then stole second and took third on a wild pitch. Jesus Montero delivered a single to left that drove in Ryan.
Hellickson allowed five hits and walked one in seven innings. He struck out one.
Celebrity Families of 2014 [PHOTOS]