SEATTLE -- Seattle Mariners starter Felix Hernandez got a big lead and got his first victory in more than a month Monday night, but he also got ejected for the first time in his career.

Hernandez wasn't allowed in the dugout for the final three innings of Monday's 12-5 win over Tampa Bay, having gotten thrown out of the game before officially earning his first win since April 11.

On a night when the Mariners (20-18) started fast with nine quick runs on the way to a season-high 12, Hernandez ended up being the story because of how his night finished.

Hernandez (4-1) allowed four runs off eight hits in 6 2/3 innings of work and got ejected as he walked off the mound in the seventh. Shortly after giving up a three-run double to Tampa Bay's Ryan Hanigan to cut the Seattle lead to 9-3 and bring manager Lloyd McClendon to the mound for a pitching change, Hernandez unleashed a profanity-laced tirade in the direction of home-plate umpire Mark Ripperger as he walked toward the home dugout. Ripperger promptly tossed Hernandez out of the game, resulting in the 28-year-old starter's first ejection of his nine-year career.

It was an unceremonious finish to a night that had started so well for Hernandez. He threw six shutout innings before Tampa Bay's first three batters of the seventh inning singled to load the bases. Hernandez struck out the next two batters before No. 9 hitter Ryan Hanigan worked him to a 3-1 count. A frustrated Hernandez then gave up the three-run double and unleashed his anger on Ripperger for a pitch that he thought should have been called a strike earlier in the inning.

Remarkably, Tampa Bay starter Cesar Ramos matched Hernandez's innings count on a night when it didn't look like the southpaw would get out of the second inning. Ramos got tagged for eight hits and eight runs in the first two innings alone and eventually fell behind 9-0, but manager Joe Maddon left him on the mound to preserve the Tampa Bay bullpen. Ramos eventually settled down and threw 114 pitches over 6 2/3 innings. All 11 hits he surrendered came in the first three innings, as Ramos (1-2) retired the final 12 batters he faced. He was charged with nine runs, but only five of them were earned -- thanks to four Tampa Bay errors in the early going.

Maddon didn't even get a reliever up in the Tampa Bay bullpen until the seventh inning, and right-hander Josh Lueke ended up being the only other Rays pitcher to see action in the game.

Seattle (20-18) piled up 13 and a season high of 12 runs in a game. Rookie right fielder Stefen Romero led the way by going 3-for-5 with a double, a home run and three RBIs. His solo shot in the bottom of the eighth inning ended a four-inning scoreless draught after the Mariners piled it on in the early going. First baseman Justin Smoak added a two-run shot three batters later to extend Seattle's lead to 12-4.

Catcher Mike Zunino also homered for Seattle.

Tampa Bay (16-23) lost for the sixth time in seven games while allowing the most runs against a Rays opponent since losing 10-2 to the New York Yankees on April 17.

Seattle jumped out to a 9-0 lead after just three innings.

Ramos gave up hits to the first four batters he faced as the Mariners built a 3-0 lead before recording an out in the bottom of the first. Things could have been even worse for the Rays had it not been for two long fly balls off Mariners bats that bounced off the top of the wall -- an inch or two from going over.

Second baseman Robinson Cano's deep shot to left field bounced off the yellow stripe and back into play for an RBI double to give Seattle a 2-0 lead, then designated hitter Corey Hart had his fly ball to right do the exact same thing one batter later. Both hits were reviewed and upheld as staying in the park. Hart's long drive scored Cano from second but only resulted in a single as he was thrown out at second base, where he stood in shock because Hart thought he had hit a two-run homer.

Things didn't get much better for Ramos in the second inning, as leadoff hitter and catcher Mike Zunino hit a 1-1 pitch over the right-field fence for a 4-0 Mariners lead. Tampa Bay went on to commit three errors in the inning, including one by Ramos, as Seattle scored five runs in the inning -- four of them unearned -- for an 8-0 lead.

Through the first two innings, the Mariners had 13 baserunners by way of eight hits, two walks, two errors and a fielder's choice.

Hart added a third-inning RBI, his second of the game, to extend Seattle's lead to 9-0.

NOTES: Rays RHP Alex Cobb, who is on the 15-day disabled list with a strained left oblique muscle, threw a 60-pitch simulated game in Port Charlotte, Fla., on Monday. ... Monday marked the first time since Aug. 15, 2012 that the Rays have faced Mariners RHP Felix Hernandez. That date is significant because Hernandez threw the 23rd perfect game in major-league history against Tampa Bay. ... Both of the replay reviews in the bottom of the first inning took less than one minute to complete. Hits by Mariners 2B Robinson Cano and DH Corey Hart clearly bounced off the yellow stripe at the top of the wall, although the home fans thought both of them were home runs. ... Tampa Bay had four errors in the first two innings alone, including three in the second.