In acient times? Counter hammer strike. As well as hit and run tactics so the hammer has nowhere to fall.

In our modern warfare without set piece battles the hammer anvil tactic is obsolete large scale because force redistribution is lighning fast.