SAN FRANCISCO (AP) — Brandon Crawford homered and drove in four runs, Anthony DeSclafani pitched six solid innings and hit an RBI double, and the San Francisco Giants beat the Chicago Cubs 7-2 on Thursday night.

Buster Posey and Alex Dickerson added two hits apiece to help the Giants win the opener of the four-game series between two of the hottest teams in the National League.

San Francisco has won seven of nine to improve to an NL-best 35-21.

Joc Pederson hit his fifth home run for the Cubs, who had won nine of 10 before losing in their first trip to the West Coast since 2019.

Crawford had an RBI single off starter Zach Davies in the second, then broke a 2-all tie with a three-run shot on a 3-0 pitch from reliever Rex Brothers in the fifth. Posey singled and Wilmer Flores walked before Crawford’s sixth go-ahead home run this season.

DeSclafani (5-2) allowed four hits and two runs with four strikeouts for his first win at home since April 26. He left after striking out the side in the sixth including Pederson, who was booed loudly by the Oracle Park crowd after repeatedly stepping out of the box.

Jarlin García retired six batters. Zack Littell set down three to complete the five-hitter.

Pederson’s fourth career home run off DeSclafani put Chicago ahead 2-1 in the third.

DeSclafani tied it in the fourth with a double that sailed over right fielder Kris Bryant and one-hopped the wall. It came after a two-out fielding error by Cubs shortstop Javier Báez.

Davies (2-3) lost for the first time since April 16, allowing eight hits and four runs in 4 1/3 innings.