Javy Baez fools Pirates into the dumbest baseball play of the season

It's cliché to say Chicago Cubs shortstop Javier Baez is magic. His nickname is literally "El Mago" — the magician. But after seeing what Baez pulled off against the Pittsburgh Pirates on Thursday, you're going to wonder if Baez is actually a wizard.

It's pointless to try and explain the wacky play first, so take a look at what happened and try to comprehend how Baez got away with it.

With a runner on second, Baez hits a ball to Pirates third baseman Erik Gonzalez. The ball is fielded cleanly by Gonzalez, who throws it to first baseman Will Craig. Gonzalez's throw takes Craig off the bag, so Craig decides he'll just tag Baez instead.

Recognizing this, Baez starts running back toward home plate. He remains in the base path, so he hasn't broken any rules. As Baez gets close to the plate, the runner who started on second sprints toward home to try and score. Craig throws the ball to the catcher, but is too late. The run scores, giving the Cubs a 2-0 lead.

Baez, who was never tagged, begins to quickly sprint toward first base. In the confusion, no Pirates player is covering first. A member of the Pirates sprints over the first, but the throw from Pirates catcher Michael Perez is just slightly off target. Baez slides into first, but then quickly gets up and makes it all the way to second base.

The Cubs dugout — primarily Anthony Rizzo — erupted in cheers and laughter following the play.

OK, Pirates fans, we know that was painful enough to watch. Unfortunately, we now have to reveal the absolute worst part of the play: There were two outs.

Craig could have stepped on first base and easily retired Baez, ending the inning. Instead, he either forgot the number or outs, or was so enticed by chasing Baez down that baseball logic deserted Craig in that moment. The rest of the Pirates bear some responsibility here too. Did any of Craig's teammates yell at him to just tag the base? They all seemed to go along with it.

The Cubs would eventually win the game 5-3.

Javier Baez explains what went through his mind during play

Baez told reporters after the game that he was actually planning to dive headfirst into first base, but the throw reached first base so early that he tried to extend the play. It was only after making a safe call at the plate that it occurred to him the run wouldn't count unless he made it to first.

Meanwhile, Pirates manager Derek Shelton immediately took responsibility for his players' gaffe(s), though you'd think an MLB manager should be able to expect his players to know that an out of first would end the inning no matter the play at home.

Pirates starting pitcher Tyler Anderson also conceded that every other player on the field should have been yelling for Craig to step on first. Alas.

The Cubs' win improved their record to 27-22. The team has played much better after a slow start, winning three straight games coming into Thursday's matchup.

The Pirates, as you may have guessed, are performing much worse this season.

More from Yahoo Sports: