in mesopotamian mythology , gilgamesh is a demigod of superhuman strength who built the city walls of uruk to defend his people from external threats , and travelled to meet the sage utnapishtim , who had survived the great deluge .