OAKLAND, Calif. — Matt Olson singled over left fielder Nicky Delmonico to drive in Marcus Semien with two outs in the 14th inning and the Oakland Athletics beat the Chicago White Sox 12-11 in a wild game that lasted nearly six hours Wednesday.

The A’s trailed 6-1, 9-4 and 10-8, then gave up a tying run in the ninth before scoring the winning run off James Shields (1-1) five innings later.

The teams combined for 33 hits and 18 walks –12 by Chicago pitchers – in a game that lasted 5 hours and 48 minutes. It was the third-longest game by time in Oakland Athletics history.

RAYS 4, RANGERS 2: Jake Faria won for the first time since last July 25, allowing one run over six innings to lead Tampa Bay over Cole Hamels and visiting Texas.

Faria (1-1) struck out six and walked one. He had been 0-4 in eight starts and two relief appearances since beating Baltimore.

TIGERS 6, ORIOLES 5: Dixon Machado led off the bottom of the ninth with a home run, capping a wild final two innings and lifting Detroit over visiting Baltimore.

BLUE JAYS 15, ROYALS 5: Teoscar Hernandez had four hits, including a two-run home run, as Toronto routed visiting Kansas City to complete a three-game sweep.

NATIONAL LEAGUE

BREWERS 2, REDS 0: Center fielder Christian Yelich returned from the disabled list and made a snazzy sliding catch on a fly ball that deflected off the glove of left fielder Hernan Perez in Milwaukee’s home win.

PIRATES 10, ROCKIES 2: Sean Rodriguez hit a two-run home run that backed Chad Kuhl and helped host Pittsburgh avoid a three-game sweep.

METS 11, NATIONALS 5: Yoenis Cespedes launched a grand slam during a nine-run outburst in the eighth inning that rallied New York past visiting Washington.

NOTES

BRAVES: Right-hander Anibal Sanchez was placed on the 10-day disabled list after straining his right hamstring while running in the outfield before Atlanta’s game against the Philadelphia Phillies.

The Braves signed Jose Bautista, a six-time All-Star, to a minor league contract.

MARINERS: Seattle recalled Ben Gamel from Triple-A Tacoma and optioned left-handed pitcher Ariel Miranda back to the minors.

ANGELS: Shohei Ohtani is expected to make his next start after he was limited to two innings in his third career start Tuesday because of a blister on the middle finger of his right hand.

Ohtani gave up three earned runs and four hits in a 10-1 loss to Boston, suffering his first loss after winning his first two major league starts.