In biology, a homonym is a name for a taxon that is identical in spelling to another such name, that belongs to a different taxon.
The rule in the International Code of Zoological Nomenclature is that the first such name to be published is the senior homonym and is to be used (it is "valid"); any others are junior homonyms and must be replaced with new names. It is, however, possible that if a senior homonym is archaic, and not in "prevailing usage," it may be declared a nomen oblitum and rendered unavailable, while the junior homonym is preserved as a nomen protectum.
Similarly, the International Code of Nomenclature for algae, fungi, and plants (ICN) specifies that the first published of two or more homonyms is to be used: a later homonym is "illegitimate" and is not to be used unless conserved (or sanctioned, in the case of fungi).
Under the botanical code, names that are similar enough that they are likely to be confused, are also considered to be homonymous (article 53.3). For example, Astrostemma Benth. (1880) is an illegitimate homonym of Asterostemma Decne. (1838). The zoological code has a set of spelling variations (article 58) that are considered to be identical.
Both Codes only consider taxa that are in their respective scope (animals for the ICZN; primarily plants for the ICN). Therefore, if an animal taxon has the same name as a plant taxon, both names are valid. Such names are called hemihomonyms. For example, the name Erica has been given to both a genus of spiders, Erica Peckham & Peckham, 1892, and to a genus of heaths, Erica L.
Hemihomonyms are possible at the species level as well, with organisms in different kingdoms sharing the same binomial. For instance, Orestias elegans denotes both a species of fish (kingdom Animalia) and a species of orchid (kingdom Plantae). Such duplication of binomials occurs in at least five instances.