Pluto's two smallest known moons have been officially named after characters associated with the underworld of Greek and Roman mythology.

Previously referred to as "P4" and "P5," P4 has been named Kerberos, after the three-headed dog of Greek mythology. P5 has been named Styx, after the mythological river that separates the world of the living from the realm of the dead.

The moons join Pluto's previously known moons Charon, Nix and Hydra.

According to International Astronomical Union (IAU) rules, Pluto's moons are named for characters associated with the underworld of Greek and Roman mythology.

Kerberos and Styx were first discovered in 2011 and 2012, respectively, through the Hubble space telescope by a team of astronomers at the SETI Institute in California.

The names were selected based on the results of a public vote held online in February 2012. The ballot received almost 500,000 votes, including 30,000 write-in suggestions. The top vote was for the name "Vulcan," based on a suggestion from actor William Shatner of Star Trek fame. Vulcan was the name of Mr. Spock's home planet.

Dr. Mark Showalter, the senior research scientist who led the discovery, said the IAU rejected the suggestion because "Vulcan" has already been used in astronomy, and because the Roman god is not closely associated with Pluto.

Kerberos is the Greek form of the name Cerberus, which ranked second in the voting. Styx ranked third. 

Pluto and its five moons will be explored further in July 2015, when NASA's New Horizons mission flies through it for the first time.

"The discoveries of Kerberos and Styx add to the mysteries surrounding the formation of the Pluto system," said Dr. Alan Stern, the principal investigator of the New Horizons mission at the Southwest Research Institute.

During the flyby, the team will also search for additional moons.