Xenia (Greek: , romanized: xenía, meaning "guest-friendship") is the ancient Greek concept of hospitality, the generosity and courtesy shown to those who are far from home and/or associates of the person bestowing guest-friendship. The rituals of hospitality created and expressed a reciprocal relationship between guest and host expressed in both material benefits (such as the giving of gifts to each party) as well as non-material ones (such as protection, shelter, favors, or certain normative rights).
The Greek god Zeus is sometimes called Zeus Xenios in his role as a protector of guests. He thus embodied the religious obligation to be hospitable to travelers. Theoxeny or theoxenia is a theme in Greek mythology in which human beings demonstrate their virtue or piety by extending hospitality to a humble stranger (xenos), who turns out to be a disguised deity (theos) with the capacity to bestow rewards. These stories caution mortals that any guest should be treated as if potentially a disguised divinity and help establish the idea of xenia as a fundamental Greek custom. The term theoxenia also covered entertaining among the gods themselves, a popular subject in classical art, which was revived at the Renaissance in works depicting a Feast of the Gods.
Xenia consists of two basic rules:
Xenia was considered to be particularly important in ancient times when people thought gods mingled among them. If one had poorly played host to a stranger, there was the risk of incurring the wrath of a god disguised as the stranger. It is thought that the Greek practice of theoxenia may have been the antecedent of the Roman rite of Lectisternium, or the draping of couches.
While this particular origin of the practices of guest-friendship are centralized around the divine, however, it would become common practice among the Greeks to incorporate xenia into their customs and manners for very much all of ancient Greek history. Indeed, while originating from mythical traditions, xenia would very much become a standard practice throughout much (if not, all) of Greece as customarily proper in the affair of men interacting with men as well as men interacting with the Gods.
The Trojan war described in the Iliad of Homer resulted from a violation of xenia. Paris, from the house of Priam of Troy, was a guest of Menelaus, king of Mycenaean Sparta, but seriously transgressed the bounds of xenia by abducting his host's wife, Helen. Therefore, the Achaeans were required by duty to Zeus to avenge this transgression, which, as a violation of xenia, was an insult to Zeus' authority.
Diomedes and Glaucus meet in no man's land. However, Diomedes does not want to fight another man descendant from the Gods, so he asks Glaucus about his lineage. Upon revealing it, Diomedes realizes that their fathers had practiced xenia with each other, and they are guest-friends. Therefore, they decide not to fight, but to continue their hereditary guest-friendship by trading armor.
Another example of xenia in the Iliad is Hector talking to Ajax. They are talking about exchanging presents so that people will remember them for dropping their hatred and becoming friends. While this is not a traditional example of xenia, it does demonstrate the power of friendship in the Greek culture.
In Book 9, Achilles invites Odysseus into his home and asks Patroclus to make the strongest wine for them to drink. Patroclus also brings meat with the wine. The men eat and have light chatter before Odysseus delivers Agamemnon's offer to Achilles.
In Book 18, Hephaestus hosts Thetis in his home. Xenia is important between humans and also between gods. Hephaestus is worried about making Thetis feel at home in his home so he lays out entertainment and puts away his tools.
In Book 24, the last book of the Iliad, Priam supplicates Achilles in an attempt to get his son Hector back. Instead of turning him out as the enemy, Achilles abides by the rules of xenia and allows him to stay.
Xenia is an important theme in Homer's Odyssey. Every household in the epic is seen alongside xenia. Odysseus' house is inhabited by suitors with demands beyond the bounds of xenia. Menelaus and Nestor's houses are seen when Telemachus visits. There are many other households observed in the epic, including those of Circe, Calypso, and the Phaeacians. The Phaeacians, and in particular Nausicaä, were famed for their immaculate application of xenia, as the princess and her maids offered to bathe Odysseus and then led him to the palace to be fed and entertained. After sharing his story with the Phaeacians they agree to take Odysseus to his home land. In a new rule, he states that you should not beat your host in a competition because it would be rude and could damage the relationship.
Because Odysseus was indirectly responsible for Poseidon's sinking one of their ships, the Phaeacians resolved to be less trusting of subsequent travelers. However, Polyphemus showed lack of xenia, despite Odysseus' reminders, and refused to honor the travelers' requests, instead eating some of Odysseus' men. The suitor Ctesippus mocks xenia by hurling a hoof, disguised as a "gift", at Odysseus. When Ctesippus is speared by Philoetius, the cowherd claims this avenges his disrespect.
In Book One, Telemachus shows xenia to the disguised Athena by graciously welcoming her into his own home and offering her food. He even moves her chair away from the suitors who are rude. Eumaeus the Swineherd shows xenia to the disguised Odysseus, claiming guests come under the protection of Zeus. When one of the suitors Ctesippus mocks the disguised Odysseus and hurls an ox's hoof at him as a "gift", mocking xenia, though Odysseus dodges this, Telemachus says if he had hit the guest, he would have run Ctesippus through with his spear. The other suitors are worried, saying Ctesippus is "doomed" if the stranger is a disguised god. As well as this, whenever Homer describes the details of "xenia", he uses the same formula every time: for example, the maid pouring wine into the gold cups, etc.
An example of bad xenia occurs when Homer describes the suitors. They continue to eat Penelope and Telemachus out of house and home. They are rude to not only each other but to Telemachus and the guests, such as disguised Athena and Odysseus.
In the Odyssey, Calypso, a fair goddess, had wanted to keep Odysseus in her cavern as her husband, but he refused. Circe had also failed to keep Odysseus in her halls as her mate. Although both of these women had fine homes and fine things to offer him, their hospitality was too much for Odysseus. He instead left each with the goal of returning to Ithaca and reclaiming his family and his home. Sometimes Hospitality was unwanted or was given unwillingly.
While the Argonautika takes place before the Iliad and the Odyssey, it was written by an Alexandrian librarian, Apollonius of Rhodes. Since the story takes place during Greek times, the theme of xenia is shown throughout the story. For example, in Book 2, the King of Bebrykians, Amykos, makes the Argonauts fight to be able to leave. Polydeukes volunteers himself to participate in the boxing match. This is a clear violation of xenia, and the Argonauts become worried when they reach their next destination later on in Book 2, when the Argonauts are on an island after a storm caused by Zeus. The Argonauts call out, asking for the strangers to be kind to them and treat them fairly. They realize that Jason and the men on the island are related by Jason's father's side of the family. The men provide clothing, sacrifice with them, and share a meal before the Argonauts leave the island in the morning.
Another example is when Jason talks about going to Aietes' palace. He says that they will receive a warm welcome and surely he will follow the rules of xenia. Another example in Book 1 is when the Argonauts are warmly received by King Kyzicus of the Doliones who provides safe harbour and sacrificial materials to help the Argonauts consecrate a new altar to Apollo.  In the opposite harbour xenia is violated by the monstrous earth-born who attack the Argonauts. 
The final example of xenia in the Argonautika is the first time the Argonauts reach Aietes' palace. It is also the first time Medeia is depicted in love with Jason due to Eros. Aietes has a feast prepared, and the Argos are served after their meal Aietes begins to ask questions about the Argonauts' purpose and voyage to his kingdom.
Historian Gabriel Herman lays out the use of xenia in political alliances in the Near East.
Solemn pronouncements were often used to establish a ritualised personal relationship, such as when "Xerxes, having been offered lavish hospitality and most valuable gifts by Pythios the Lydian, declared "...in return for this I give you these privileges (gera): I make you my Xenos. ...the same set of words could be applied in non-face-to-face situations, when a ruler wished to contract an alliance through the intermediary of messengers." Herman points out that this is correspondent to pacts made by African tribal societies studied by Harry Tegnaeus (in his 1952 ethno-sociological book Blood Brothers) where "the partners proclaim themselves in the course of the blood ceremony each other's 'brothers', 'foster-brothers', 'cousins'. The surviving treaties of 'fraternity' 'paternity' and 'love and friendship' between the petty rules of the ancient Near East in the second half of the second millennium B.C. incorporate what are probably written versions of such declarations." (Herman also sees an echo of this in the medieval ceremony of homage, in the exchange between a would-be-vassal and the lord.)
Herman goes on to point out "No less important an element in forging the alliance was the exchange of highly specialized category of gifts, designated in our sources as xénia (as distinct from xenía, the term of the relationship itself) or dora. It was as important to give such gifts as to receive, and refusal to reciprocate as tantamount to a declaration of hostility. Mutual acceptance of the gifts, on the other hand, was a clear mark of the beginning of friendship." Herman points to the account of Odysseus giving Iphitos a sword and spear after having been given a formidable bow while saying they were "the first token of loving guest-friendship". Herman also shows that Herodotus holds "the conclusion of an alliance and the exchange of gifts appeared as two inseparable acts: Polykrates, having seized the government in Samos, "concluded a pact of xenia with Amasis king of Egypt, sending and receiving from him gifts (dora)". Within the ritual it was important that the return gift be offered immediately after receiving a gift with each commensurate rather than attempting to surpass each other in value. The initial gifts in such an exchange would fall somewhere between being symbolic but useless, and of high use-value but without any special symbolic significance. The initial gifts would serve as both object and symbol. Herman points out that these goods were not viewed as trade or barter, "for the exchange was not an end in itself, but a means to another end." While trade ends with the exchange, the ritual exchange "was meant to symbolize the establishment of obligations which, ideally, would last for ever."