SEATTLE (AP) — Robbie Ray pitched into the sixth inning and had 10 strikeouts, the most by a Seattle pitcher this season, and the Mariners beat the Philadelphia Phillies 5-4 on Tuesday night.

Ray (3-3) gave up two runs on two hits while walking two in 5 2/3 innings.

“I definitely felt like everything was clicking tonight,” Ray said. “There’s still work to be done, but I felt like this was a really, really good step in the right direction.”

Nick Castellanos, Rhys Hoskins and Jean Segura had solo homers for Philadelphia, which has lost six of eight. Phillies manager Joe Girardi was ejected in the second inning for arguing when the Mariners’ Adam Frazier was called safe after inadvertently knocking the ball out of first baseman Hoskins’ glove on a play that led to a Seattle run.

Ray started with four perfect innings but ran into trouble in the fifth. He gave up Castellanos’ leadoff homer and struggled with his control as Segura scored on a walk and a pair of wild pitches. Ray gave up a second walk and only got out of the inning when catcher Luis Torrens threw out Matt Vierling on a third-strike wild pitch that went to the backstop.

Ray came back out in the sixth and got two more strikeouts before giving up one of Bryce Harper’s two doubles on the night.

Seattle signed last year's AL Cy Young Award winner to a $115 million, five-year deal as a free agent in the offseason.

“I thought it was one of his better games he’s had so far as a Mariner,” manager Scott Servais said. “Really sharp. The fastball had really good life up in the zone, and that’s where he’s at his best. Fastball at the top and slider down below.”

Aaron Nola (1-4) lost his fourth straight decision, giving up four earned runs on nine hits, although many of those came on infield singles.

“He pitched great,” Girardi said. “It’s really a shame. That’s probably as frustrating an outing as you can have as a pitcher.”

Paul Sewald allowed a run while getting four outs but held on for his first save.

Seattle took a 2-0 lead in the first inning on run-scoring singles by Eugenio Suarez and Julio Rodriguez and scored another pair in the fifth. After loading the bases, Nola hit Ty France with a pitch and J.P Crawford drove in a run with a sacrifice fly.

In the second, Torrens hit a one-out infield single and took second base on a throwing error by Nola. In the next at-bat, Frazier hit a grounder to second. The throw to first beat Frazier, but Hoskins had to stretch up the line to catch it, and Frazier hit Hoskins’ glove as he reached first, knocking the ball loose. Frazier was called safe as Torrens scored.

“I was trying to avoid stepping on him. I didn’t even know he dropped the ball until I turned around and say the umpire say safe,” Frazier said. “Weird play, just trying to avoid hurting myself or Hoskins there.”

Girardi came out to argue with first base umpire Brian Knight and then crew chief Bill Miller at third. As the discussion went on, Girardi grew more heated and was eventually ejected by Miller.

Girardi said the umpires thought Hoskins hadn’t completed the play, and although the play was reviewable, the umpires told him the 20-second clock for a manger’s challenge was already done by the time he came out of the dugout.

“I went out and when I walked out of the dugout he said, ‘No, time’s up.’ No chance,” Girardi said. “That ends up being a big play. At the time, it maybe doesn’t seem like it. But it’s really disappointing to me, that someone doesn’t recognize that’s not 20 seconds.”

Torrens was also ejected in the eighth inning for his reaction after he was called out on a checked third-strike swing.

MISCUES

The Phillies had four errors, a season high, including two by Hoskins.

TRAINER’S ROOM

Mariners: Crawford was back in the starting lineup after missing two games with back spasms.

UP NEXT

Phillies: LHP Bailey Falter (0-1, 4.91 ERA) will be called up from Triple-A Lehigh Valley to make the second start of his career. Faulter has pitched in four games for Philadelphia this year, all in relief, and has allowed four runs on eight hits in 7 1/3 innings.

Seattle: RHP Logan Gilbert (4-0, 1.36) makes his seventh start of the season. The AL pitcher of the month for April has the second-best ERA in the American League.

More From 1460 ESPN