OAKLAND, Calif. -- Third baseman Josh Donaldson hit a three-run, walk-off home run Friday night, lifting the Oakland Athletics to a 5-4 victory against the Baltimore Orioles at the O.co Coliseum.

The walk-off hit was the fifth of Donaldson's career, including three homers.

Left fielder Yoenis Cespedes led off the ninth with an infield single off Baltimore closer Zach Britton and moved to third on right fielder Brandon Moss' broken bat single to right.

Donaldson, who started for the American League All-Star team, crushed Britton's first pitch over the center field fence for his 21st home run of the season.

Baltimore third baseman Manny Machado and second baseman Jonathan Schoop hit two-run homers, powering the Orioles to a 4-2 lead, but it disappeared in the ninth.

Cardinals 3, Dodgers 2

ST. LOUIS -- Matt Holliday drove in all three St. Louis runs with a double and a two-run homer, and starter Lance Lynn worked into the seventh inning in a win over Los Angeles.

Lynn (11-6) allowed four hits and two runs in six-plus innings, leaving after the Dodgers started the seventh with consecutive doubles by Juan Uribe and A.J. Ellis. Ellis scored on reliever Seth Maness' wild pitch with one out, but the St. Louis bullpen kept things in check after that.

Pat Neshek worked out of a two-on, one-out jam in the eighth, and Trevor Rosenthal pitched a clean ninth for his 29th save in 33 chances.

Yankees 4, Reds 3

NEW YORK -- Jacoby Ellsbury hit a two-run home run in the fifth inning, and New York ended a five-game home losing streak with a victory over Cincinnati in the opener of a 10-game homestand.

Ellsbury gave the Yankees the lead for good with nobody out in the fifth when he drove a 1-1 pitch from right-hander Mike Leake (7-8) over the right field wall for his seventh home run of the season.

The Yankees improved to 19-23 at home by getting production from their three big offseason additions to the lineup as Ellsbury, Carlos Beltran and Brian McCann were a combined 5-for-12 with four RBIs.

Brewers 4, Nationals 2

WASHINGTON -- Milwaukee starting pitcher Kyle Lohse outdueled Washington's Stephen Strasburg, and solo home runs from Scooter Gennett and Khris Davis sparked the Brewers to victory.

Lohse (10-4) joined Wily Peralta as Milwaukee's second 10-game winner thanks to a seven-inning effort in which he scattered 10 hits but walked none and allowed just one run.

The victim of five blown saves this season, Lohse received help from three relievers, including Francisco Rodriguez, who picked up his 28th save despite giving up a ninth-inning home run to Bryce Harper.

Strasburg (7-7) racked up nine strikeouts to boost his NL-leading total to 158.

Rangers 5, Blue Jays 1

TORONTO -- J.P. Arencibia hit a three-run homer against his former team, and Yu Darvish pitched into the seventh inning as Texas snapped an eight-game losing streak by beating Toronto.

Adrian Beltre also homered for the Rangers, and Rougned Odor had three hits, including a double and an RBI triple.

Darvish (9-5) allowed five hits, three walks and one run while equaling his season high with 12 strikeouts.

Giants 9, Marlins 1

MIAMI -- Left-hander Madison Bumgarner pitched six strong innings, and the San Francisco offense broke out in a win over Miami.

Bumgarner (11-7), an All-Star in each of the past two years, allowed four hits, two walks and one run, striking out seven. His only blemish was a solo homer blasted to center by Giancarlo Stanton, his 22nd home run of the season.