CLEVELAND – Russell Branyan hit a two-out, two-run single in the ninth inning Thursday night, rallying the Cleveland Indians to a crazy 8-7 victory over the Boston Red Sox.

“I hit it and just held my breath until it hit the ground,” Branyan said.

Cleveland overcame three errors in one inning by third baseman Andy Marte, a 5-0 deficit and a blown save by Kerry Wood.

“That’s about as roller coaster as you can get,” Red Sox Manager Terry Francona said.

Adrian Beltre’s two-out, two-run homer in the ninth off Wood (1-2) put Boston ahead, 7-6.

The Indians quickly loaded the bases with no outs against Daniel Bard (1-2) in the bottom half. Bard, closing while Jonathan Papelbon is on the bereavement list, then struck out Travis Hafner and retired Jhonny Peralta on a foulout.

Branyan then delivered a looping single over second baseman Dustin Pedroia in shallow right.

“I was praying for it (to be caught),” Bard said. “It was in no-man’s land.

“There wasn’t a point in that inning when I thought I wouldn’t get out of it. I think you have to have that mentality.”

Wood got two fast outs in the ninth before hitting J.D. Drew in the right leg with a pitch. Beltre then hit his eighth homer to put Boston ahead.

Beltre is 5 for 14 (.358) with three home runs and seven RBI in his career against Wood, who blew his second save in six tries.

“I threw four bad pitches in a row,” Wood said. “I hit a guy, went to 2 and 0, then he hit the next one out. I’m still kicking myself for hitting Drew.”

The Indians loaded the bases against Bard on walks to Trevor Crowe and Austin Kearns around an opposite-field double by Shin-Soo Choo. Two outs later, Branyan won it.

“I hit it right into the teeth of the shift,” Branyan joked.

“Two outs, game on the line, I don’t think it gets any more nerve-racking than that. You make an out and the game’s over. You’ve got a guy out there throwing 100 miles an hour. You try to pick out a pitch you can get some wood on.”

One night after handing the Red Sox an 11-0 loss, their worst of the season, the Indians finally gained a second consecutive home victory for the first time since winning four in a row April 15-18 at Progressive Field.

Lou Marson’s two-run single in the sixth put Cleveland ahead 6-5 against Boston starter Jon Lester.

Marte helped atone for his miscues with an RBI single to bring the Indians within 5-4 in the sixth. Marson followed with a slicing, opposite-field bloop to score two more.

Marte become the first major leaguer with three errors in an inning since Chicago White Sox third baseman Andy Gonzalez on Aug. 30, 2007. According to the Elias Sports Bureau, the last Indians player to commit three errors in an inning was shortstop Frank Duffy on Sept. 24, 1972 — in the 11th inning of the first game of a doubleheader against the New York Yankees.

Marte bobbled a ground ball by Kevin Youkilis with the bases loaded, scoring one run. Later, he made two errors on one play as two runs scored when he mishandled a grounder hit by Mike Cameron, scrambled after it and threw wildly to first.

“It was the worst inning of my career,” Marte said. “I felt so bad, but now I feel so good because my teammates picked me up.”