Escaping Pawn

Sort:
crazypigg

I initially posted this in the puzzles forum but its actually a general chess query.

I was recently playing a tactic puzzle (not from chess.com) on my phone. The position is shown below. With White to move.  I couldn’t figure out what move to make, any move I made it said no, so I clicked for the solution and it was to move my pawn from g5 to f6. After playing the move, black retreated his king (threatened by Ne4) to h6.  Anyway, in short, how could my pawn move to f6? Is this a rule I am unaware of?

rooperi

Well, Black's previous move must have been f7-f5, and gxf is an en passant capture.

blackrabbitto

That's right ... chess.com's Tactics Trainer throws one of these in from time to time, and it's caught me out more than once Yell

crazypigg

Oh yeah of course! I know en passant but wasn't expecting it and didn't consider that it could have been blacks previous move (which wasn't shown). I'd have got it if it had shown blacks move, I was just thinking of my move. Thanks guys. Now unbaffled.