LOS ANGELES -- A.J. Ellis was entirely unaware of what was going on behind him.

All the Dodgers catcher saw was a bunted ball that rolled into fair territory and a batter and two baserunners who weren't moving -- the makings of a strange triple play.

Having heard nothing from the mouth of home-plate umpire Dale Scott, Ellis coolly picked the ball up and fired it to third baseman Juan Uribe, starting a controversial 2-5-6-3 triple play that eventually got Padres manager Bud Black ejected for arguing and sparked a 5-4 Dodgers victory.

"It had that overspin on it, and I just wanted to play it out," said Ellis, whose Dodgers won on a walk-off single a few minutes later. "One thing we learn is you keep playing and don't assume anything. Just play, play, play until somebody stops you."

But to Black in the dugout, Jesus Guzman at the plate and Chase Headley and Yonder Alonso on the bases, "Stop" was exactly the message they got from Scott. When the ball was originally bunted, Scott appeared to throw his arms up in the air as if to signal the play dead.

"The whole play looked funky," Black said. "I saw the hands go up. Our impression was that it was a foul ball. It happened so fast. I didn't like the result."

As soon as Ellis picked the ball up in fair territory, however, Scott pointed decisively fair, but by then the Padres runners had already reacted.

As they protested from the field, the Dodgers infielders tossed the ball around the horn for the club's first triple play since 1998.

"He was waving, not once, but twice," said Headley, who was on first. "To me, that means it's a foul ball. What are we supposed to do? From my vantage point, we did what we [baserunners] were supposed to do. It's just a crazy thing."

With the game tied at 4 in the ninth, Dodgers pitcher Javy Guerra allowed the first two Padres runners to reach base. He then came inside on Guzman, who tried unsuccessfully to pull his bat away. Had he done so, the ball would have likely hit him, leaving some question initially as to whether the ball hit the bat or Guzman.

But replays confirmed a bunted ball, and it trickled slowly into fair territory for Ellis. Though the Padres insisted otherwise, Scott said his signal of fair was the only one he made.

"The ball went straight down, and I thought it hit the bat," Scott said. "I heard bat. I moved out of the way of the catcher, and now, all of a sudden, I have two bodies in front of me. I didn't see where the ball was. I saw it trickle in front of the plate. Without having seen it hit, I have to assume that's a fair ball."

Ellis, who said he'd never been a part of a triple play at any level, said he didn't have much doubt that the play would result in a triple play -- even after the four umpires met near the mound to discuss it.

"As soon as we got the ball to Juan I saw nobody else running and was like, 'This is going to be a triple play,'" Ellis said. "Let's get off the field as quick as we can and let them sort it out. But I was pretty confident coming off the field that the call was going to stand."