Updated

OAKLAND, Calif. (AP) The World Series champion San Francisco Giants were eliminated from wild-card contention Friday night, falling to Sonny Gray and the Oakland Athletics 5-4.

The Giants' third straight loss put the Chicago Cubs into the postseason for the first time since 2008.

Manager Bruce Bochy's team, which won the World Series in three of the past five seasons, fell to 79-74 this year. The Giants remained eight games behind the NL West-leading Dodgers with nine left.

The Giants host the Dodgers for four games next week.

Billy Burns hit a two-run homer and Billy Butler added a solo shot as the A's snapped a five-game losing streak.

Gray (14-7) struck out seven in six innings to bounce back from two rough starts in which he had no-decisions.

Matt Duffy and Jarrett Parker homered for the Giants. Mike Leake (10-10), acquired earlier this season to help for the stretch run, took the loss.