ST. PETERSBURG, Fla. — In baseball, the All-Star break operates much like the bye week in football. It is a time to take a brief respite from scouting the upcoming opponent to take a glance within.

And as the Red Sox ponder the Red Sox over the next four days, maybe they'll wonder how much longer their bullpen can sustain its first-half success.

The bullpen that has been perhaps the club's nicest surprise of the first half faltered on Sunday, with Matt Barnes and Joe Kelly combining to surrender a late lead in a 5-3 loss to the Rays at Tropicana Field. A road trip that had started so promisingly with five consecutive wins ended with four losses in five games, including three of four here to Tampa Bay.

"Just a good baseball game and we didn't come out on the right end," said starter David Price, who was terrific over six innings.

"A couple tough losses, particularly these last two days," manager John Farrell said.

Boston enters the break at 50-39, 3.5 games clear of the Yankees and Rays in the division.

Before the bullpen became involved Sunday, the Red Sox appeared on the verge of one of their most memorable wins of the first half. Dustin Pedroia, who had been locked in long battles with Chris Archer all day, finally beat him in the seventh with an opposite-field home run to turn a 2-1 deficit into a 3-2 Boston lead.

That lead was handed first to Barnes, who emerged as John Farrell's go-to set-up man early in the season, the surprise fill-in for Thornburg after Kelly stumbled late in spring. But over his last dozen appearances, Barnes' tendency to issue free passes has come back to haunt him. The right-hander has walked 11 men in that span — and it's bitten the Red Sox in two different games now.

It was Barnes who walked the only two batters he faced in Kansas City the day Sal Perez took Robby Scott deep for a game-winning grand slam. And on Sunday, Barnes committed as cardinal a sin as they get: He walked a leadoff man with speed.

After gladly taking the four-pitch free pass, pinch-hitter Mallex Smith moved to second on a bunt, third on an infield single, and came home on a sacrifice fly into foul territory to tie the game.

Kelly did not take the moral of the seventh inning to heart, as he himself walked Logan Morrison to lead off the eighth. After Kelly retired the next two Rays, Brad Miller went down and got a 1-2 curveball that stayed above the knees and delivered it beyond the center-field wall, just beyond the reach of Jackie Bradley, Jr.