SAN DIEGO — For the first time this season, Travis Shaw was bolted to the bench for three consecutive games as the Red Sox took a long look at rookie Yoan Moncada.
They even worked out Shaw in left field, a sign they were seemingly committed to giving Moncada a real shot.
Then Moncada started striking out and couldn’t stop, going down seven times in a row as opposing pitchers bamboozled him with breaking pitches. That prompted manager John Farrell to put Shaw back in the lineup against the San Diego Padres on Wednesday night.
Shaw won’t be coming out any time soon. He homered and drove in three runs as the Sox rolled to a 7-2 victory before a crowd of 31,662 at Petco Park.
With Toronto losing, the 78-61 Red Sox are alone in first place in the American League East for the first time since July 21. The Sox and Blue Jays start a three-game series in Toronto on Friday.
David Price allowed two runs over seven innings for his sixth consecutive win. He scattered six hits and struck out eight without a walk.
“This is where we wanted to be,’’ Price said.
For Shaw, it’s been a roundabout path to that spot. He was hitting .295 with an .869 OPS on June 1. He was one of the team’s most productive hitters at that point.
Shaw then hit .204 with a .631 OPS over three long and frustrating months. The Sox traded for righthanded-hitting Aaron Hill in July to make Shaw a platoon player. When he continued to struggle, they turned to Moncada.
The threat of Moncada triggered something. Shaw is 8 of 18 with three doubles, two home runs and nine RBIs in his last five games.
“I think I’ve played my whole career that way, trying to prove something, kind of a back-against-the-wall type of thing. It seems like it brings out the best in me,’’ Shaw said.
“You just try and keep that edge as long as I can. Tonight there was obviously an edge there.’’
Shaw said he felt his swing coming back into shape at Tampa Bay from Aug. 23-25. He went 2 for 10 in that series but felt like he was staying with his plan.
“I can tell by certain swings that the direction is where it needs to be,’’ he said.
Farrell doesn’t care what the reason is. He just wants a third baseman who will produce.
“If competition makes guys respond favorably — you know what? — that makes us a better team,’’ he said.
Hanley Ramirez and Brock Holt also homered as the Sox took two of three from the Padres. They are 4-2 on the road trip and have won 11 of their last 17 on the road.
The offense got started early. With a runner on first and two outs in the second inning, Shaw destroyed a first-pitch fastball from San Diego starter Jarred Cosart. The ball landed several sections deep in right field.
It was Shaw’s 16th home run.
Jackie Bradley Jr. reached on an error with one out in the fourth inning and the play knocked Cosart out of the game.
Bradley grounded to the right side and first baseman Wil Myers made a high flip to Cosart covering the bag. When the pitcher came down, he strained his right hamstring and groin.
Righthander Carlos Villaneuva replaced Cosart and allowed a single by Chris Young. Shaw followed with a groundball single to right field and Bradley scored.
With Price up, Young and Shaw pulled off a double steal. They got such good jumps that catcher Derek Norris didn’t bother making a throw. It paid off when Dustin Pedroia doubled to right field and two runs scored.
Jake Smith made his major league debut in the eighth inning and Ramirez welcomed him with a line-drive home run to left field. He has 21 homers and 90 RBIs on the season.
Price allowed two runs in the first three innings, then blanked the Padres from there to improve to 15-8.
Yangervis Solarte had an RBI double in the first inning. Cosart and Jon Jay had singles to start the third inning. A bunt by Luis Sardinas and Myers’s sacrifice fly scored Cosart.
That was it. Price retired 12 of the final 13 batters he faced. He is 6-0 with 2.14 earned run average in his last six starts. That has dropped his ERA from 4.34 to 3.87.
When he struggled earlier in the season, Price never wavered from the idea that he would pitch his best when it counted.
“I know it was going to happen. I knew good things would happen for me,’’ he said. “I’ve had a lot of good things over the course of my last how many starts it’s been. I just want to keep it going.’’
Farrell then worked on his bullpen. In his first appearance since July 19, Koji Uehara pitched a perfect eighth inning. He struck out the first two batters he faced.
Uehara didn’t break 86 miles per hour with his fastball but he threw 11 of 13 pitches for strikes.
Brad Ziegler, who had not pitched since Aug 27 because of the flu, came in for the ninth inning and retired two of the three batters he faced.
Farrell then went to closer Craig Kimbrel, who had faced two batters since Aug. 31. He got the final out as a tune up for the weekend.
The Sox finished interleague play at 14-6. Starting with the Toronto series, their final 23 games are against teams in the division.
Peter Abraham can be reached at pabraham@globe.com. Follow him on Twitter @PeteAbe.