CHICAGO — Alexei Ramirez scored the winning run in the bottom of the ninth inning on a throwing error and the Chicago White Sox edged the Boston Red Sox 2-1 on a frigid Tuesday night.

Tied at 1-1, Red Sox reliever Burke Badenhop (0-2) allowed a one-out single to Ramirez. After Tyler Flowers stuck out, Chris Capuano replaced Badenhop.

Capuano walked Adam Eaton to move Ramirez to second. Then, with a 3-2 count, Marcus Semien hit a grounder to shortstop Xander Bogaerts, who one-hopped his throw to first baseman Mike Carp. Carp wasn’t able to scoop the throw and Ramirez, who was already running on the pitch, never stopped when rounding third and scored without a throw.

White Sox reliever Daniel Webb (1-0) got one out in the ninth for the victory.

The temperature at first pitch was 40 degrees. All the players except for White Sox starter Erik Johnson and Eaton wore long sleeves under their jerseys and the upper deck was closed because of ice on the ramps.

Adam Dunn homered for the White Sox, who have won four of their past five games.

Daniel Nava homered for Boston, which has lost three straight.

Mike Napoli left in the top of the ninth inning after injuring his left ring finger sliding into second base.

With two outs, Napoli advanced to second on Donnie Veal’s wild pitch. Napoli slid headfirst into second and appeared to dislocate his left ring finger against the base.

Red Sox starter Jake Peavy allowed one run and three hits in six innings on 113 pitches against his former team in his third straight no-decision.

He struck out eight and walked four.

Johnson pitched 62/3 innings and struck out a career-high nine in his eighth career start. He allowed one run and three hits with two walks.

In the second inning, White Sox Manager Robin Ventura challenged a call by first-base umpire Cory Blaser. Ventura challenged that Napoli’s foot was off the base when he fielded Bogaerts’ throw to get Jose Abreu. The replay was ruled inconclusive so Blaser’s call was upheld.

Dunn followed with his third homer of the season.

With two outs in the fourth, Nava tied the game with a solo shot to right.

It was his second homer of the season.

PEDROIA INJURY: Red Sox second baseman Dustin Pedroia had a cortisone injection in his left wrist and hopes to return to Boston’s starting lineup on Wednesday night. The AL MVP was injured April 4 when Milwaukee’s Carlos Gomez broke up a double play at second base in the ninth inning. Pedroia is hitting .139 (5 for 36) since then with one RBI and no walks, leaving his season average at .236.

He missed Sunday’s series finale at the New York Yankees.

Pedroia replaced Mike Napoli in the top of the ninth inning against the Chicago White Sox on Tuesday when Napoli was injured sliding into second base. Pedroia remained in the game in the bottom of the ninth and played second base.

“I was getting a little bit worried. It was getting worse every day,” Pedroia said.