SAN FRANCISCO (AP) - Jacob deGrom pitched eight strong innings and Wilmer Flores hit a home run and drove in two runs as the New York Mets defeated the San Francisco Giants 5-2 on Saturday.

DeGrom (7-3) struck out seven and allowed one run while scattering four hits to lead the Mets to their second win in a row after they had lost four straight and seven of eight entering the series.

The Giants, who are on pace to lose more than 100 games for the first time since arriving on the West Coast, continued their freefall. They've lost 11 of their last 12 games, 13 of 15 and 20 of their last 25.

Curtis Granderson tripled off Sam Dyson (0-1) to lead off the eighth inning and scored on Jay Bruce's RBI single. Flores doubled in Asdrubal Cabrera later in the inning to extend the lead to 3-1. The Mets made it a four-run lead in the ninth when Michael Conforto drove in Jose Reyes and later scored on a wild pitch.

Brandon Belt homered in the seventh for the Giants.