Black Caps tailender Neil Wagner was run out in bizarre circumstances to end New Zealand's first innings in the second test against Bangladesh.

Wagner looked to have completed a single when Bangladesh wicketkeeper Nurul Hasan threw the ball behind his back, hitting the stumps as Wagner lifted his foot in the air.

Wagner had already grounded his bat but because he hadn't grounded a foot within the crease, the laws of cricket say he was run out.

It ended the New Zealand innings at 354, a 65-run lead over Bangladesh. Wagner was the last man out of 24.