In ancient Athens "epigamia" (Ancient Greek: ἐπιγαμία) designated the legal right to contract a marriage. In particular it regulated the right of intermarrying into another city-state. In the period of Athenian democracy, such intermarriage was not allowed, and only a decree of the popular assembly could permit it. Even resident aliens (metoeci) did not have the right to marry Athenians.

Epigamia was also a way of formalizing the relationship between different nations. Typically, an epigamia agreement would allow the adoption of the nationality of the country of residence, for the spouse as well as children. For example, Athens granted epigamia to Euboa in the 5th century, a very rare case.

Some cases are known (especially through Plutarch), in which epigamia was denied between two villages of Attica, Pallene and Hagnous, presumably because alliances would have been akin to endogamy.

In 303 BCE, Seleucus I led an army to the Indus in India, where he encountered Chandragupta. The confrontation ended with a peace treaty, and "an intermarriage agreement" (epigamia), meaning either a dynastic marriage or a more general agreement for intermarriage between Indians and Greeks. Accordingly, Seleucus ceded to Chandragupta his northwestern territories as far as Arachosia and received 500 war elephants (which played a key role in the victory of Seleucus at the Battle of Ipsus):