The first known written record of the name "Macau", rendered as "Ya/A Ma Gang" ("亞/阿-媽/馬-港"), is in a letter dated 20 November 1555. The local inhabitants believed that the sea goddess Mazu (alternatively called A-Ma) had blessed and protected the harbour and called the waters around A-Ma Temple using her name. When Portuguese explorers first arrived in the area and asked for the place name, the locals thought they were asking about the temple and told them it was "Ma Kok" (媽閣). The earliest Portuguese spelling for this was ‘Amaquão’, and with time, it ended up as “Macau”.
Mazu, also known by several other names and titles, is a Chinese sea goddess. She was born as a human, becoming a demigod and finally goddess. She is described as a young girl who always roams the seas accompanied by two demons, a red one called Qianliyan ("Thousand-Mile Eye") and a green one called Shunfeng'er ("Wind-Following Ear") which both fell in love with her and she conceded that she would marry the one who defeated her in combat, however, she subdued them both and, after becoming friends, hired them as her guardian generals.