LOS ANGELES -- Dodgers outfielder Yasiel Puig took a swing at San Francisco Giants catcher Nick Hundley, and both players were ejected after a benches-clearing scrap in the seventh inning Tuesday night.

Puig swatted his bat in frustration after fouling off a pitch from Tony Watson, and Hundley said something to the Dodgers slugger while still in his crouch. Puig turned around and walked toward Hundley, the catcher stood up and they stood face to face and argued for a moment before Puig shoved Hundley twice.

That brought players out of the dugouts and bullpens. Puig and Hundley were momentarily separated, but Puig ducked around teammates, coaches and manager Dave Roberts before reaching back to hit Hundley. Puig smacked Hundley with an open hand across the front of his catcher's mask.

"When I missed the pitch, I knew I thought it was the best pitch that Watson was gonna throw me," Puig said through an interpreter. "So I was a little upset, and [Hundley] told me to stop complaining, get back into the box. And when I got in his face, he told me to also get out of his face. So that's when I got upset.

"I didn't like that he was telling me what to do, and then he said some words to me in English that I really can't repeat. So that is why I was upset."

Hundley offered his take.

"We're competing on the field against a team we're chasing. They've been scuffling a little bit, and we're trying to catch them. Obviously a nice rivalry," Hundley said. "We had some words and pushed a couple times. There's really not more to it than that."

Dodgers coach George Lombard was trying to push Hundley away when Puig took his swing. Lombard and Hundley briefly ended up on the grass.

Hundley spoke to Lombard later.

"He was in there trying to break it up," Hundley said. "I think he got caught up in my chest protector. We went down, and I knew I was on top of him at some point. I just asked him if he was all right. You don't want anyone hurt in those situations."

After the players were separated for good, the umpires ejected both Puig and Hundley.

Puig was replaced at the plate by Austin Barnes, who inherited a 1-2 count and struck out. Buster Posey, who had been playing first base, replaced Hundley behind the plate, and Brandon Belt came off the bench to take over at first base.

The Giants won the game 2-1.

It was the fourth career ejection for Puig, who got into a skirmish with Giants pitcher Madison Bumgarner in 2014.

"It doesn't happen with other teams, and it doesn't seem to happen when we're in San Francisco," Puig said. "It usually seems to happen when we're here. And I'm not gonna let them act like that in our house."

Information from The Associated Press was used in this report.