By the Associated Press

Ryan Howard hit a go-ahead, two-run homer in the sixth inning and the Phillies snapped a nine-game losing streak with a 2-1 victory over the Baltimore Orioles Thursday at Citizens Bank Park.

The Phillies, who have the worst record in the majors at 23-45, avoided being swept in four consecutive series. They had lost 19 of 22.

Manny Machado hit his third career leadoff homer and second in three games against the Phillies. But he struck out with runners on first and third and one out in the seventh.

Jake Diekman (1-1) pitched a 1-2-3 sixth in relief of Sean O’Sullivan to earn the win in his first game back from a brief stint at Triple-A. Jonathan Papelbon closed for his 13th save in 13 tries.

Howard hit his 12th homer, connecting off starter Bud Norris (2-5) to put Philadelphia ahead for the first time in its four-game, home-and-home series against Baltimore.