Greek city-state patron gods

Ancient Greek literary sources claim that among the many deities worshipped by a typical Greek city-state (sing. "polis", pl. "poleis"), one consistently held unique status as founding patron and protector of the "polis", its citizens, governance and territories, as evidenced by the city's founding myth, and by high levels of investment in the deity's temple and civic cult. The temple of the deity involved was usually founded on the highest ground (acropolis) within the city walls, or elsewhere within the central public assembly space, the "agora". Conversely, a city's possession of a patron deity was thought to be a mark of the city's status as "polis".
Some "poleis" seem to have had several "patron gods" in sequence, or all at once. Some had more than one founder, or founding myth. A few would have superficially resembled a collection or tribal coalition of villages rather than the single, centralised entity suggested by the English term "city-state"; early Sparta provides a clear example of this. Some "poleis" seem to have had no distinct or identifiable patron deity.
Greek city-states.
The rise of the "polis" seems to have coincided with Greek abandonment of kingship, and its replacement by warrior-aristocracies, and rulers elected by self-governing citizen communities. Greek city-states were governed from a "prytaneion", a building thought to have functioned as a palace under monarchs, and otherwise as an administration centre, with a large reception hall that also housed the sacred "common hearth" of the polity.
Foundation deities.
The hearth of every "prytaneion" and domestic household was sacred to the goddess Hestia, whose presence and cult within the "prytaneion" and households justified the civil, political and religious basis of the city's public life, and the community's decisions concerning treaties, laws, institutions and traditions. In founding a new colony, live embers of Hestia's fire were carried from the parent-"polis" to the colonial "prytaneion", where they were used to kindle the new colony's sacred, sacrificial fire. Without an "agora", sacrificial fire, altar and Hestia, there could be no city. This aside, "poleis" were largely self-defined; they need not be politically independent, they might use any of various regional Greek dialects and their size seems to have been an irrelevance to their definition as "poleis", or modern identification as "city-states". Some were enclosed within larger states. Some had only 200-500 male citizens and no more than a few square kilometers of agricultural land. Others were very populous, or became so through confederation, with estimated populations of many thousands, and with lands and influence extending many miles into surrounding countryside, or across the Mediterranean Sea. Land hunger and warfare were endemic. The two largest and most powerful of these states, Sparta and Athens, mutually antagonistic for much of their history, both acknowledged the same protective deities. Where Sparta chose conquest and subjection of its Greek-speaking neighbours to the immediate west (see Mantinea), Athens used her navy to help establish new, colonial "poleis" much further afield.
Prospective founders of Greek city-states and colonies sought the approval and guidance not only of their "mother city" but of Apollo, through one or another of his various oracles. Apollo acted as consulting archegetes (founder) at Delphi, and among his various functions, he was patron god of colonies, architecture, constitutions and city planning. Greek colonies were founded throughout the Mediterranean world, some of them very distant from their "parent" cities. Based on epigraphic evidence Herman-Hansen (1994) estimate the number of Greek "poleis" to have been "over one thousand... including colonies", presuming a "prytaneion" a reliable indicator of a city-state, and thus, perhaps, of a patron deity. A legendary divine institution pertaining to "patron deities of the polis" seems evident in Apollodorus, "Bibliotheca" 3.14.1; "in the time of Kekrops, they say, the gods decided to take possession of cities in which each of them should receive his own peculiar worship". Plato's belief that every "polis" had a divine patron was carried into modern scholarship. "About 91" "prytaneia" are identified in literary sources. "Prytaneia" are archaeologically confirmed at Delos, Lato and Olympia, and six others are reasonably secure.
Greek city-state foundation myths are always tied to a particular place, foundation date and festival, sometimes to a civic ancestor - who might also be a heroic or divinised proto-founder, such as Heracles - and often, but not always, to a named deity. The problems involved in the identification of patron deities, and of the "poleis" as "poleis", can be complex. Versnel finds that the "image of gods as city patrons is theoretical rather than evidential". There is no formula that helps differentiate state cults from civic cults, or identify a protective or patron deity of the "poleis" within a given local pantheon. "Conversely, some "poleis" seem to have had several [patron deities], some to have changed their patron deity over time, and some to have had no patron god or goddess at all." Even Hestia can pose problems in the identification of a "polis"; according to Herman-Hansen, most archaeologists have identified as "prytaneion" any large, apparently public building containing a hearth, assuming it a sign of Hestia, not a commonplace kitchen utility. Herman-Hansen believe that a complete "prytaneon" should surely contain two hearths – one for Hestia and another for cooking at feasts, though no "second hearth" has been found in any building identified as a "prytaneon".
Deities of place.
Several states or communities might lay claim to the favour of a particular deity; the foundation myth of Athens, whose navy was a major factor in the city's growth and defence, had Athena and Poseidon, god of the sea, compete in a chariot race for the honour of becoming the patron of Athens. This was not interpreted as conflict between the cults or supporters of the deities concerned; a deity worshipped in one place under a particular epithet could be identified elsewhere by another epithet, referring to the different locations of their temples, or to particular aspects of their divine powers, or effectively, their recognition as a different manifestation of the same deity. Patron gods were a focus in the diplomacy and political life of the "polis"; and are sometimes referred to as "poliad" gods in modern scholarship but they were not definitive of a "polis", nor a universal requirement. Athena and Apollo, being both powerful and well-equipped to manage and regulate the needs of city-dwellers, are among the most common named patron gods of "poleis".
Panhellenic deities were recognised as universal, but they were still deities of place. To this extent, almost every Greek deity has a tutelary aspect. Each was manifest in a shrine, temple, precinct, sacred image or natural feature of the "polis" landscape, adding up to a sort of divine network or collective cultivated by the community, to be propitiated in times of need, and honoured and thanked for assistance rendered. While some deities might have greater protective functions than others, many thanksgiving inscriptions and dedications tend to play safe, acknowledging the help and support of quite minor or local deities as well as any major deities officially enrolled as protectors of the "polis". Citizens were acculturated to their unique and distinctive local identity, ancestors, territories, heroes, gods and founding myths.