SEATTLE — All it took for the Red Sox to emerge from their slump at the plate was to face one of the best starters in baseball.
David Ortiz and Pablo Sandoval hit home runs on Saturday night as the Red Sox beat Felix Hernandez and the Seattle Mariners, 4-2, before 45,055 at Safeco Field.
The Sox, 18-19, have won five of their last seven games. They are 5-4 on a road trip that ends Sunday afternoon.
The upwardly mobile stretch for the Sox includes victories against Oakland ace Sonny Gray and now Hernandez.
"It feels good to finally feel like we're moving forward," shortstop Xander Bogaerts said.
Rick Porcello (4-2) allowed two runs over 6⅔ strong innings. Tommy Layne, Junichi Tazawa, and Koji Uehara were perfect in getting the final seven outs. It was the ninth save for Uehara.
Uehara has thrown 7⅔ scoreless innings in his last eight outings. Opponents are 0 for 23 against him.
Sox pitchers retired the final 10 Mariners in order.
"You know who is on the other side,'' Porcello said, referring to Hernandez. "At the end of the day you have your game plan. Your assignment is to get their hitters out, not pitch against the other pitcher. Our offense did a great job of putting up some runs on him, getting him in trouble."
The Sox scored three runs in the first two games of the series and had only seven runs in their previous four games. They had eight hits and drew five walks Saturday.
"Given the way things have been going, four runs are a little bit of an outburst for us," manager John Farrell said. "We had a very good approach."
Hernandez was 6-0 with a 1.85 earned run average in his first seven starts. In his previous five starts against the Sox, King Felix was 3-0 with a 2.02 ERA.
But Hernandez lasted only six innings, giving up a season-high four runs on seven hits and four walks. He left trailing, 4-2.
Sandoval, pleased to see a righthander on the mound, homered to left-center in the second inning, connecting on a sinker that stayed up. It was his fifth homer on the season.
Ortiz, who has always hit Hernandez well, homered in the third inning when he lined another wayward sinker over the wall in right field.
It was the first home run for Ortiz since April 24. He had gone 68 at-bats without one.
Ortiz was 2 for 2 with a walk against Hernandez. He is 15 for 38 (.395) against Hernandez in his career.
"Felix challenges hitters and David is always up for a challenge," Farrell said.
The Sox scored two more runs in the sixth inning against Hernandez.
With Sandoval at the plate, Seattle manager Lloyd McClendon came to the mound accompanied by a trainer to speak with Hernandez, who had twisted his right ankle on the mound. After a brief conference, they returned to the dugout.
Hernandez retired Sandoval on a ground out but walked Bogaerts and Daniel Nava. Blake Swihart, who had singled in the second inning, followed with an RBI double to left.
Hernandez then walked Jackie Bradley Jr. to load the bases. Brock Holt hit a ball hard down the first base line that scored Nava. A nice stop by Logan Morrison saved at least one other run from coming in.
Dustin Pedroia had a chance to break the game open but grounded to shortstop.
"We took some pitches, forced the pitch count to go up a little bit, and took our bases on balls," Farrell said.
Porcello allowed two solo home runs to Brad Miller, one in the first inning and the other in the fifth. Beyond that he allowed only three other hits. He struck out six and walked two.
Porcello caught a break in the fourth inning. With a runner on first, Dustin Ackley lined a ball to the gap in right field that hopped the fence for a ground-rule double. Kyle Seager would have easily scored otherwise. With runners at second and third, Porcello got Chris Taylor to ground to shortstop.
Porcello is proving to be one of the few reliable starters the Red Sox have. He has allowed six earned runs over 25⅔ innings in his last four starts and struck out 21 with five walks. That has dropped his ERA from 6.48 to 4.26.
The Sox are 6-2 in games Porcello starts.
Since Carl Willis became pitching coach last Sunday, the Red Sox have a 2.97 ERA over seven games. It was 5.04 before that.
"We're throwing the ball the way we should be," Porcello said. "We have to continue to do that. Hopefully those struggles are behind us."
When Porcello left the game with two outs in the seventh, Ortiz was waiting at the top step of the dugout to hug him.
"You need the pitching, I always say that," Ortiz said. "Porcello, he beat a great pitcher tonight."