LOS ANGELES (AP) — Exhausted yet exhilarated, the Dodgers headed home for a catnap. The Red Sox may well toss and turn thinking about one that got away.

Max Muncy’s home run leading off the bottom of the 18th inning finally ended the longest World Series game in history early Saturday and gave Los Angeles a 3-2 victory over Boston that drew the Dodgers to 2-1 in the best-of-seven matchup.

Muncy homered to left-center on a full-count pitch from Nathan Eovaldi, jolting the remaining fans to their feet at 12:30 a.m. A grinning Muncy tossed his helmet aside as he headed for third in the final scene of a pivotal game that lasted 7 hours, 20 minutes.

“What a ballgame. What a marathon,” Dodgers third baseman Justin Turner said. “Unbelievable fight from our club.” “I think my beard got about 3 inches longer.”

The Red Sox were oh-so-close in the 13th to taking a commanding Series lead. But veteran second baseman Ian Kinsler’s wide throw on a two-out grounder by Yasiel Puig let Los Angeles score the tying run.

Game 4 is later Saturday at Dodger Stadium. Eovaldi had been scheduled to start for the Red Sox, but he threw 97 pitches over six-plus innings in relief as one of nine pitchers they used. The Dodgers backtracked on Rich Hill and said they would announce a starter later.