WASHINGTON (AP) — Brandon Belt homered off Tanner Roark in the 18th inning to lift the San Francisco Giants to their 10th consecutive postseason victory, edging Washington 2-1 on Saturday for a 2-0 lead in the National League Division Series.

It equaled the mark for most innings in a postseason game and set a time record at 6 hours, 23 minutes.

Later, Matt Kemp hit a go-ahead home run leading off the eighth inning, lifting the Los Angeles Dodgers to a 3-2 home win over the St. Louis Cardinals to level their NL Division Series at one game each.

Down to their final out in the ninth, the wild-card Giants leveled it on Pablo Sandoval's RBI double, then saw Nationals manager Matt Williams and second baseman Asdrubal Cabrera ejected in the 10th.

Yusmeiro Petit entered in the 12th and threw six scoreless innings, allowing one hit and striking out seven, to earn the win. Hunter Strickland got the save with a scoreless 18th.

The Giants can close out the best-of-five NLDS at home Monday in Game 3, with Madison Bumgarner — who tossed a shutout against Pittsburgh in the wild-card game — facing Doug Fister.

That would be quite a sudden end to 2014 for the Nationals, who won the NL East and led the league with 96 wins. But after a pair of one-run losses, they're looking as if they're the latest team that can't figure out how to get past San Francisco.

When he drove the ball into the second deck beyond right field, Belt dropped his bat and admired the shot as the Nationals Park crowd fell silent. When Belt got to the dugout, teammates slapped him on his head.

Only one other postseason game in baseball history lasted 18 innings — when the Astros beat the Braves 7-6 in a 2005 NLDS. Tim Hudson started that game for Atlanta — he was the Giants' starter in this one.

At Los Angeles, Kemp practically skipped down the first base line, appearing to coax the ball fair as it sailed inside the foul pole and into the lower left field seats while the crowd of 54,599 erupted in cheers. Bubbles percolated into the hot night air from a machine in the dugout that the Dodgers turn on to celebrate homers.

No one looked happier greeting Kemp in the dugout than J.P. Howell, who had served up a tying, two-run homer to Matt Carpenter in the top of the inning after relieving Zack Greinke. Kemp hugged Howell after connecting off Pat Neshek.

Game 3 is Monday night in St. Louis, with John Lackey starting for the Cardinals against Ryu Hyun-jin.