Following a loss in the first game of a double header earlier in the day to the Washington Nationals, Matt Kemp and the Los Angeles Dodgers knew that the second one was a must-win for the team.

The Dodgers were still a few games back in the National League wild-card and another loss may have crippled their chances at getting it. They kept pace in the chase, beating the Nationals 7-6 to stay just two games behind the St. Louis Cardinals for the final playoff spot.

Los Angeles jumped out to a 6-0 lead, including a controversial run scored by Kemp in the fourth, before giving it all back in the eighth inning.

Kemp was called safe by the home plate umpire, although replays showed that Nationals third baseman Ryan Zimmerman had tagged base runner Adrian Gonzalez for the final out of the inning before Kemp crossed the plate.

"It looked pretty close. I actually probably should have been running just forward and not looking back. ... I don't know if I quite made it or not," Kemp said, before asking reporters whether they had seen a replay. "Actually, yeah, I don't think I did. But we got lucky right there. We stole a run."

In the ninth inning Kemp broke the tie with a solo home run off of Tyler Clippard to clinch the win. The Nationals had won the first game 3-1 behind a strong game from pitcher Jordan Zimmerman.

In the eighth inning the Nationals brought 12 batters to the plate as they tied the score at 6-6.

"At the time, I don't think anyone thought (the run) was a really big deal, but it turned out to be a big deal," Zimmerman said. "It was 5-0, and they just make it 6-0."

The inning started on a leadoff home run from Michael Morse, which was followed by a Stephen Lombardozzi two-run shot. The Nationals added three more runs to tie the game heading into the ninth.

"Calls like that, you never know when they're going to come back and kick you," said Washington's Morse, who also had a two-run single in the eighth.

Following Kemp's home run, Brandon League entered the game for the Dodgers and closed it out for his third save.

The Dodgers have been struggling lately, losing nine of 12 games, but are still only two games out of the wild-card chase.

"We're not shooting for a playoff spot. We're shooting to win a division," Clippard said. "So regardless if we won tonight or not, that's not really where we want to be."

Josh Beckett started the game for the Dodgers and allowed three runs in seven innings. He also gave up two home runs.

Nationals' manager Davey Johnson wasn't too happy with the call on Kemp's run.

"They all discussed it, and evidently nobody was paying attention," Johnson said. "Kemp wasn't running. He just wasn't running. The tag play was before. Obviously they missed it, but you'd think when the three of them got together somebody would've been paying attention that Kemp was not at home."

Los Angeles will start Chris Capuano (11-10, 3.60 ERA) on Thursday against Washington's Ross Detwiler (9-6, 3.16).