|White to move and win|
To share some interesting background, I first encountered this puzzle in Chess.com's tactics trainer. I confidently played the first few moves, knowing that my pawn would promote before winning the game with a stylistic skewer. I proceeded to queen without hesitation, when... DOH! The red "Incorrect" signal flashed on the interface.
Post analysis, it turned out that I had fallen for a trap set up by Black to save the game. Now, let us see whether y'all managed to avoid that trick!
To prevent ... Be5 taking away the White pawn's promoting square. 1. h7? Be5 and White cannot promote his pawn.
2. h7 Be5!
A sneaky stalemate trick set up by Black. You will see the purpose of luring White's king onto e5 later on!
3. Kxe5 b2
The only way to avoid stalemate! Promoting to a Queen allows Black to force a stalemate: 4. h8=Q? b1=Q 5. Qb8+ (Skewering the enemy Queen, otherwise it would be a drawn position anyway.) 5... Kc4! and after ... Qxb1 Black is stalemated. Note that if White's king had not been lured onto e5 this trick would not have worked!
5. Rb8+ Kc4
Now Black's king still has a legal move 6... Kd3. White wins the endgame.
So that probably woke you up a bit, did it? Now, get back to your exam revision! (: