1.
turning the tables; beating one's attacker
Defeating the person who came to attack or challenge you, so that the attacker ends up beaten. Originally said of a samurai killed by the enemy he sought revenge on; now common in sports, games and everyday talk.
返り討ちにあう。
To be beaten by the one you attacked.