ST. PETERSBURG, Fla. — Wade Miley pitched well into the sixth inning Tuesday night before the Boston bullpen protected his stellar effort.

Miley and four relievers combined on a four-hitter and the Red Sox took advantage of an error to beat Chris Archer and the Tampa Bay Rays, 1-0.

Miley (1-1) gave up three hits, four walks and had three strikeouts over 52/3 innings. Alexi Ogando, Robbie Ross Jr. and Junichi Tazawa combined to retire seven straight batters before Koji Uehara allowed a leadoff single in the ninth before finishing for his second save.

“He was down in the strike zone pretty consistently throughout the time on the mound,” Boston Manager John Farrell said of Miley. “The guys coming out of the bullpen did an absolutely outstanding job.”

Archer (2-2) allowed one unearned run and seven hits in 52/3 innings for the Rays, who have lost the first four games of a nine-game homestand. He struck out nine and walked one.

Archer had his scoreless streak end at 16 innings when second baseman Ryan Brett was charged with an error for a wild throw to first on a potential inning-ending double-play grounder by Dustin Pedroia that allowed Ryan Hanigan to score.

Mookie Betts’ slide into second base helped disrupt Brett’s throw.

“It’s things we’ve talked about,” Betts said. “That was my chance to put it into play. Nothing dirty, just trying to break up the double play and it worked out that time.”

Brett called Betts’ slide a hustle play.

“I’ve got to give credit to him,” Brett said.

Boston has scored 19 unearned runs this season.

Ogando replaced Miley with the bases loaded and two outs in the sixth, and got a grounder from Desmond Jennings.

“That’s huge,” Miley said. “You absolutely put your confidence in the bullpen.”

Miley has won all three starts against the Rays, allowing one earned run in 19 innings.

Brett got the Rays’ first hit, an infield single in the third in his first major league start.

He got picked off first and departed with an injured left shoulder, which was sore after the game and will be re-examined Wednesday.

Boston designated hitter David Ortiz played after appealing a one-game suspension for making contact with umpire John Tumpane during the fifth inning of Sunday’s game against Baltimore and went 0 for 3 with a walk.

NOTES: Left fielder Hanley Ramirez was in the lineup after leaving Monday’s game due to illness. … Miley stumbled to the ground twice after delivering a pitch. In the sixth, Farrell and a trainer went to the mound to check on Miley, who was OK.

“That’s me not being athletic at all,” Miley said with a smile. “I’m completely fine.”