SAN DIEGO (AP) — Ten days ago the San Diego Padres were thinking about a playoff run. Now they are closer to gaining the No. 1 draft pick rather than the National League's No. 2 wild card.

Jerome Williams stifled San Diego over seven innings and the Philadelphia Phillies beat the Padres 5-3 on Sunday to complete a three-game sweep.

The Padres matched their season-high with the sixth straight loss and they have dropped seven of their last eight.

"If the term 'snake-bit' is supposed to reflect a team not getting a break, that's what has happened to us," Padres interim manager Pat Murphy said.

The Phillies, meanwhile, notched their 16th win in 21 games, the majors' best mark since the All-Star break.

Williams (4-8) entered the game with an 0-6 road record this season before dominating the fading Padres. He was charged with one run and five hits and struck out three.

"I just kept the ball down in the zone," Williams said. "If I consciously keep the ball down I get my ground balls."

Ken Giles worked the ninth to collect his sixth save in nine chances.

Andrew Cashner (4-12) worked 6 1-3 innings and allowed three runs and eight hits. He struck out four.

"I had good stuff," Cashner said. "I felt like I was just missing on some sliders there, especially in the seventh. Overall, I was throwing my fastball well and I was pretty please with my stuff."

Cesar Hernandez's RBI single in the seventh off reliever Brandon Maurer padded the Phillies' lead to 3-1. They left the bases loaded when Marc Rzepczynski struck out Ryan Howard.

Chase Utley added a two-run, pinch-hit double in the eighth.

Yangervis Solarte had an RBI single in the eighth to make it 5-2.

Justin Upton's two-out homer in the sixth cut the Phillies' lead to 2-1.

Odubel Herrera gave the Phillies a 2-0 lead when he hit his sixth homer of the season to open the sixth inning. Before Herrera's blast, Cashner had retired 14 of the previous 15 batters.

Williams gave the Phillies' unlikely second-half surge more life. He breezed through the first four innings, restricting the Padres to two baserunners.

"I feel for these guys because it's not lack of effort," Murphy said.

It's the consistency that has caused the Padres' woes.

"We played good baseball there for a while, and then we've definitely been scuffling," Cashner said. "We're probably just pressing a little bit too much, but I still believe in these guys."

Phillies interim manager Pete Mackanin has always been high on Cashner.

"I like his arm; we had him on the ropes early in the first inning and he settled down," Mackanin said. "You got to like him because he has the stuff to be successful. It's all about command of your stuff. If you got command that is the difference and you become a better pitcher."

The Phillies went ahead 1-0 in the first on Howard's RBI double. Hernandez and Herrrea singled and Howard smoked a line drive to right field that a diving Matt Kemp just missed to score Hernandez. With two runners in scoring position, Cashner escaped further damage by striking out Jeff Francoeur and getting Cody Asche to fly out.

TRAINERS ROOM

Padres: OF Wil Myers (left wrist) swung a short bat in his rehabilitation process on Sunday. His next step is hitting off the tee and soft toss pitches.

UP NEXT

Phillies: RHP Aaron Harang (5-12, 4.11) will open a three-game series at Arizona on Monday. Harang, who has lost nine of his last 10 decisions, is 4-9 lifetime against the Diamondbacks.

Padres: RHP Ian Kennedy (6-10, 4.49) goes for his fourth win in his last five starts as the Padres open a three-game series on Monday at home with Cincinnati.

SAME TEAM, DIFFERENT SITE

Williams is familiar with the Padres' haunts. He's one of 12 active pitchers to have toed the rubber at Petco Park and Qualcomm Stadium. The Padres moved into Petco Park in 2004.