Apollodorus, Library and Epitome 2.4.3
View the Perseus Text

So Perseus put the head of Medusa in the wallet (kibisis) and went back again; but the Gorgons started up from their slumber and pursued Perseus: but they could not see him on account of the cap, for he was hidden by it.

Being come to Ethiopia, of which Cepheus was king, he found the king's daughter Andromeda set out to be the prey of a sea monster. For Cassiepea, the wife of Cepheus, vied with the Nereids in beauty and boasted to be better than them all; hence the Nereids were angry, and Poseidon, sharing their wrath, sent a flood and a monster to invade the land. But Ammon having predicted deliverance from the calamity if Cassiepea's daughter Andromeda were exposed as a prey to the monster, Cepheus was compelled by the Ethiopians to do it, and he bound his daughter to a rock. When Perseus beheld her, he loved her and promised Cepheus that he would kill the monster, if he would give him the rescued damsel to wife. These terms having been sworn to, Perseus withstood and slew the monster and released Andromeda. However, Phineus, who was a brother of Cepheus, and to whom Andromeda had been first betrothed, plotted against him; but Perseus discovered the plot, and by showing the Gorgon turned him and his fellow conspirators at once into stone. And having come to Seriphus he found that his mother and Dictys had taken refuge at the altars on account of the violence of Polydectes; so he entered the palace, where Polydectes had gathered his friends, and with averted face he showed the Gorgon's head; and all who beheld it were turned to stone, each in the attitude which he happened to have struck. Having appointed Dictys king of Seriphus, he gave back the sandals and the wallet (kibisis) and the cap to Hermes, but the Gorgon's head he gave to Athena. Hermes restored the aforesaid things to the nymphs and Athena inserted the Gorgon's head in the middle of her shield. But it is alleged by some that Medusa was beheaded for Athena's sake; and they say that the Gorgon was fain to match herself with the goddess even in beauty.