SAN FRANCISCO (Reuters) - The San Francisco Giants scotched Roy Halladay's perfect start to the season with a 5-1 victory over the Philadelphia Phillies on Monday.

The former American League Cy Young winner allowed five runs and 10 hits in seven innings to lose his first game in five starts.

"They hit some good pitches and I made some poor pitches that cost me," Halladay told reporters. "You learn from it and move on. You show up tomorrow, work hard and go out and be aggressive next time."

Mark DeRosa hit a two-run single in the first inning and Eli Whiteside added an RBI double in the second and a solo home run in the seventh against Halladay to give the Giants (11-8) their third win in four games.

San Francisco left-hander Jonathan Sanchez allowed one run and struck out six to earn his second win of the year.

Sanchez had to scrap during an outing that included five walks, and he escaped a bases-loaded one-out jam in the third without surrendering a run.

Guillermo Mota pitched one and a third scoreless innings in relief for the Giants while Sergio Romo handled the final two innings to nail down the win.

Shane Victorino led the way with three hits for the Phillies (11-8), who left 11 runners on base.

Philadelphia slugger Ryan Howard went 0-for-3 to continue his struggles at the plate on the same day he agreed to a contract extension with the team worth at least $125 million over five years.

(Reporting by Jahmal Corner in Los Angeles; Edited by Patrick Johnston