Well, they didn't have gunpowder, but they did their best with what they had: they digged tunnels under enemy fortifications and then they set the supporting pillars on fire, causing the tunnel to collapse. They used "tunnel bombs", only without the bombs