BOSTON (AP) — Manny Delcarmen struck out Sammy Sosa on a 96 mph, full-count fastball with the bases loaded on Friday night to preserve the win for Tim Wakefield and give the Boston Red Sox a 2-1 victory over the Texas Rangers.

Wakefield (8-8) gave up one run and seven hits, striking out four and walking four. Delcarmen relieved him with two on and two out in the seventh, then walked the bases full before fanning Sosa to end the threat. Hideki Okajima pitched a perfect eighth before Jonathan Papelbon made things interesting in the ninth.

Kenny Lofton’s fourth hit was on a slow bouncer to the right side that went between Papelbon and first baseman Kevin Youkilis. The pitcher took a short diversion before heading for first, and by the time he caught the throw and got his toe on the bag Lofton was safe.

Papelbon was furious at the call — replays showed that he might have been right — and he had to be pushed away from first-base umpire Mike Reilly by second baseman Dustin Pedroia. The 40-year-old Lofton then stole second — his fourth steal of the game — and Jerry Hairston Jr. was hit by a pitch. Papelbon then struck out Michael Young for his 19th save.

The Red Sox snapped a three-game losing streak and improved to .500 for June, their worst month this season. Lofton has stolen four or more bases in a game four times in his career. He has 619 stolen bases, passing George Davis for 16th on the career list.

Jamey Wright (1-2) left with nobody out in the sixth, allowing two runs and six hits, three walks and a hit batter while striking out three. He also had some bad luck on Boston’s go-ahead run.

After walking two and then moving the runners up with a wild pitch, Wright got Manny Ramirez to hit a hard chopper back to the mound. The ball bounced off Wright’s right foot — right to third baseman Ramon Vazquez; all he had to do was wait for David Ortiz to lumber down the line to tag him for the third out.

But Youkilis was hustling home, crossing the plate before the tag. Umpire Andy Fletcher pointed to the plate to signal that the run counted, giving Boston a 2-1 lead.