BALTIMORE (AP) – Erik Bedard pitched seven innings of two-hit ball, Kevin Millar homered against his former team, and the Baltimore Orioles ended a 13-game losing streak against the Boston Red Sox with a 4-3 victory Wednesday night.

The Orioles had lost eight in a row this season against Boston and were winless against their AL East foes since Sept. 2, 2005. The victory also enabled Baltimore to end an eight-game home skid against the Red Sox.

Bedard (5-2) gave up one run, a pair of doubles and three walks. The left-hander, who came in with a 7.57 ERA in six career starts against the Red Sox, struck out three. It was his first victory in five starts since April 20.

LaTroy Hawkins struck out two during a perfect eighth. Chris Ray gave up a two-run homer to David Ortiz in the ninth inning to make it 4-3 before the reliever got three outs for his 10th save. It was Ortiz’s 13th homer.

Millar put the Orioles ahead 2-1 against Tim Wakefield (3-5) in the fourth with his third homer, the first since April 12. The drive to left came after Javy Lopez hit a leadoff single.

Millar went 2-for-2 with a walk. He was also hit by a pitch.

Baltimore made it 4-1 in the fifth. Melvin Mora singled, took third on a double by Miguel Tejada and scored on a groundout by Ramon Hernandez. Tejada took third on the play and came home on a wild pitch.

That was more than enough offense for Bedard, who was pulled after throwing 100 pitches. Wakefield allowed four runs and eight hits in seven innings. He struck out six and walked three. Boston got a run in the first inning when Kevin Youkilis drew a leadoff walk, took third on a double by Mark Loretta and scored on a groundout by Ortiz.

Bedard also walked the leadoff hitter in the second and third innings, but averted any damage. After giving up a free pass to Youkilis in the third, he retired 11 straight before Manny Ramirez led off the seventh with a double.

Bedard then retired Mike Lowell on a foul pop and Wily Mo Pena on a comebacker before concluding his fine performance by getting Trot Nixon on a groundout to second.

Notes: Baltimore 2B Ed Rogers got his first start, batting leadoff and going 1-for-4. … Boston played its seventh straight errorless game. The Red Sox have made only one error in their last 13 games. … Boston’s 13-game run against the Orioles was its second-longest against an opponent in the last 50 years, topped only by its 15-game streak against Seattle in 1977-78.

AP-ES-05-17-06 2148EDT