Yes, it's called En Passant. Look it up, it's an interesting rule.
Is this move allowed ?
I presume move 27 was a2-a4 and Black then played bxa. Yes it's legal, it's called en passant: http://en.wikipedia.org/wiki/En_passant
If it happened to you don't feel bad. It can be a shocking move to new players that don't know about it, and has led to countless arguments when the "victim" accuses the person who used En Passant of cheating. Just remember it for future games. 
Watch this game , Move number 27 , black take white pawn by crosdsing it, Is this move allowed ?