SEATTLE -- A nice outing from Jeff Niemann and plenty of offense helped the Rays snap a three-game losing streak with a 9-3 win over the Mariners on Wednesday night at Safeco Field with 16,476 on hand.

The Rays broke out of their offensive slump with a 15-hit attack that saw them score in seven of their nine turns at bat. And while the offense kicked into gear for the first time since Friday night, the game might well be remembered as a coming of age game for Rays starter Jeff Niemann.

"Niemann was really good tonight," Rays manager Joe Maddon said. "I like the way he pitched primarily with his fastball, and then he mixed in some breaking balls, but primarily pitched with his fastball which I really liked. ... I just saw a confident guy who pitched a pretty good ball game."

Niemann won the fifth starter's job on the final day of Spring Training before getting off to an 0-2 start. But he has continued to improve to the point where the 6-foot-9, 280-pound right-hander was downright nasty Wednesday night.

Because of Niemann's height, harnessing his mechanics has been an obstacle for his progression through the Rays' farm system. Many times in the past his windup has been discribed as having too many moving parts. And too many moving parts often translated to not being able to find the strike zone. Yet Niemann's height also has proved to be one of his biggest advantages. When he delivers one of his pitches, the ball arrives at the hitter from a downward angle unfamiliar to most players in baseball.

Niemann was perfect through four frames, literally, as he retired the first 12 Mariners hitters he faced. The perfect game fell by the wayside when Rays shortstop Jason Bartlett threw wild to first after fielding Adrian Beltre's ground ball to start the fifth. Niemann then walked Ronny Cedeno before Jose Lopez hit a three-run homer on an 0-1 pitch.

What Niemann did following his misfortune may have shown more about his mettle than the four perfect frames.

Niemann appeared to have retired Rob Johnson, the hitter following Lopez, on a pop foul, but catcher Dioner Navarro and first baseman Carlos Pena got their signals crossed and ran into each other, allowing the ball to drop to the turf. Johnson took advantage of his second chance by stroking a single to right field.

Seemingly everything suddenly was going wrong for Niemann, who never appeared to get rattled. He retired Franklin Gutierrez on a fly out before getting Yuniesky Betancourt to ground into an inning-ending double-play.

"He held it together very nicely," Maddon said. "We believed that about him during Spring Training. We believed that he has good makeup. We saw him as a tough guy."

Niemann left the game after 5 1/3 innings in favor of J.P. Howell, who struck out Ken Griffey Jr., and Beltre to end the sixth.

Niemann felt pleased about his outing.

"It was good," Niemann said. "I would have liked to have gone a little deeper [into the game]. But I got a little wild there towards the end. It was good overall."

Carl Crawford and Evan Longoria led the Rays' offensive attack.

Crawford had four hits, a walk, a stolen base, an RBI, and he scored three times.

"We got it going on offense, we were swinging the bats well, we weren't leaving guys on base," Crawford said. "It was a good time to start swinging the bats. Hopefully we can start swinging the bats and get something going."

Meanwhile, Longoria had three hits, a walk and three RBIs, including a fourth-inning double that drove home Crawford for the Rays' sixth run and the 100th RBI of Longoria's career. Longoria reached the lofty plateau in his first 135 games, which makes him the third quickest active player to reach the mark behind Ryan Braun (118 games) and Albert Pujols (131).

"I think from the beginning our approach was pretty good," Longoria said. "Overall it was just one of those things. We haven't been hitting on all cylinders. And it helps tremendously when you get a good start, you get a guy three or four innings in and he's scoreless. Then the offense has a chance, even if we're not hitting, we're able to relax, attack, and score runs.

"I think we just need to settle in a little more. We don't have a whole bunch of time. We don't want to say, 'Oh we've got a bunch of time, we've got a bunch of time.' When in reality if we don't start winning some games here it's going to get tough to get back into the race. This is a good start. We need to win a bunch of games in a row and get back over .500."