Origins and Names
The Maiar belong, together with the Valar, to the wider order of the Ainur, the spirits who had being before Eä was made and whose voices were joined in the Great Music from which the design of the world first arose. Within that shared order, what distinguished a Maia from a Vala was not descent or kind but degree: each Ainu had been given a measure of power and knowledge by Ilúvatar at the outset, and those of lesser measure came to be reckoned among the Maiar rather than the Valar. This meant the boundary between the two ranks was one of strength and station, not of separate origin, and the greatest of the Maiar could stand closer in might to the least of the Valar than to their own weaker kin.
The words "Maiar" and its singular "Maia" are the terms by which Elvish tradition classed these spirits collectively, set down in the lore that survives as the Valaquenta. In practice, however, individual Maiar are rarely called by this general label within the narratives themselves; they instead appear under names given to them once they had taken up a role, a household, or a people to serve, so that the common noun for their order functions more as a scholarly classification than as a name used in everyday speech among Elves or Men.
This gap between technical order and everyday name is visible in the case of the Istari sent to Middle-earth in the Third Age: though of Maia origin, they were known to Elves and Men simply as wizards, or by the Elvish term Istari, and their true nature as spirits of that higher order was understood only by the wise or set down afterward in lore compiled by scholars of Middle-earth.
History
When the Valar passed into Eä to give shape to the design first sounded in the Music, many of the Maiar entered the world alongside them, and in these earliest ages their labor was bound up directly with the physical forming of Arda: the raising of lands, the setting of the seas and rivers, and the tending of the light of the Two Lamps and afterward the Two Trees. This was a time of shared toil rather than of fixed station, spirit working beside spirit without the lasting attachments that would later define them. Only once the Valar had established their own realms, and Valinor was raised beyond the mountain wall of the Pelóri, did the Maiar begin to settle into the more particular roles for which later ages remembered them.
In this settled age, most Maiar bound themselves to a single Vala's household or dominion. Ossë and Uinen took the sea under Ulmo, though Ossë's love of storm and shoreline once led him to defy the Valar's own design, raising his waters against the moving of Tol Eressëa until Uinen's counsel checked him; Ilmarë served as handmaid to Varda, and Eönwë stood as herald and banner-bearer to Manwë. Others attended Aulë, Yavanna, Estë, Vána, or Nienna, and it was in the households of Manwë and Nienna that the spirit later known as Olórin learned the pity and patience for which he was afterward valued in Middle-earth. These attachments were not offices imposed from without but bonds of will and affection, and they largely determined which Maiar would later be drawn out into the wider world.
One such bond carried a Maia beyond Valinor altogether. Melian, of Vána and Estë's people, left the Blessed Realm in the twilight before Sun and Moon to wander in Middle-earth, and in the forest of Nan Elmoth she met and wed the Elven-king Thingol, becoming with him the founder and warder of the hidden realm of Doriath. For long ages her power held the Girdle of Melian about that land, but after Thingol's death at the hands of Dwarves over the Nauglamír, her grief severed her from the realm she had shielded; she forsook Doriath and returned across the Sea to Valinor, and her long sojourn as queen among the Elves came to its end.
Not all Maiar kept faith with the Valar. Even before the Elves awoke, Melkor drew a number of his former kin into his service through fear or the promise of power, and chief among these was Sauron, once of Aulë's people, who became Melkor's most trusted lieutenant. Other spirits corrupted in the same way took the form of fire and shadow and were afterward known as the Balrogs. This defection opened a lasting division within the order, setting Maiar who remained loyal to the Valar against those bound to Melkor's rebellion, a rift that ran beneath the whole subsequent history of Beleriand.
The Balrogs served as Melkor's most feared agents through the long wars of Beleriand, and it was only with the War of Wrath at the end of the First Age, when the Valar and their host broke Melkor's power utterly, that their numbers were destroyed or scattered into hiding in the deep places of the earth. Sauron alone among the great fallen Maiar survived that war, first submitting and then fleeing judgment to begin his own dominion. Across the Second Age he rose again as a Dark Lord in his own right, forging the Rings of Power and building his strength in Mordor, until his first overthrow at the end of that age by the Last Alliance of Elves and Men.
In the Third Age the Valar sent five Maiar into Middle-earth in the guise of old men, the order later called the Istari, charged to rouse and counsel its free peoples against Sauron's return without ruling or overawing them. Their mission, beginning around the middle of that age, ran through centuries of watchfulness to its culmination in the War of the Ring and Sauron's final defeat. With that war's end the Istari's task was fulfilled, and most who remained departed over the Sea from the Grey Havens, closing the last chapter of the Maiar's direct engagement in the affairs of Middle-earth and returning the order, in the main, to Valinor.
Nature, Craft, and Embodiment
The Maiar, like the Valar whose people they were, possessed no body of flesh by their own nature. The shapes in which they appeared to Elves and Men were a raiment freely put on by the spirit's own will, not a form it was born into, so that a Maia could go unclad and imperceptible, or could take the seeming of bird, beast, or a fair man or woman, as the office it had chosen required. This freedom set them apart from the Children of Ilúvatar, who lived and died within bodies given to them at birth; a Maia's true being was never bound to one shape, and its proper end, when it came, lay not in the failing of flesh but in the diminishment or ruin of its own inward power.
Within that freedom, each Maia's labor tended to follow the particular skill or temper of the Vala it had chosen to serve, so that the order as a whole held a wide range of crafts and offices rather than one common trade. Among the more far-reaching of these charges were those given to Arien, a spirit of fire set to guide the vessel of the Sun, and to Tilion, a hunter of Oromë's following entrusted with the piloting of the Moon; the one held a steady course and the other a wandering one, and together their journeys through the sky established the reckoning of day and night by which later ages measured time. Other Maiar lent their skill to healing, weaving, star-lore, or smithcraft, so that a Maia's craft, more often than any name, marked the household it had served.
Yet the raiment a Maia assumed was not without cost. A shape held too long, or taken up in the service of malice, could bind its wearer more closely than intended, so that power was spent into the form itself and grew harder to lay aside; by this slow narrowing, some of the mightiest among the fallen Maiar came at last to be unable to take any shape but a diminished and graceless one. Even the loyal were not exempt: a Maia clothed in bodily form for long service in Middle-earth could feel weariness, hunger, and hurt as the flesh it wore allowed, and was not thereby immune to violence, however enduring the spirit beneath remained.
In the Story
Within the narrative itself the Maiar function less as a populated cast than as an explanatory layer sitting just behind events, accounting for why acts of power in the tale vary so wildly in scale. The Valar themselves rarely appear as active agents once the world is made; it is their people, scattered and often unnamed as a class, who carry the reach of the higher powers down into the affairs of Elves and Men. A storm that turns providential, a counselor who happens to know more than any mortal could, a stranger whose menace outweighs his stature — the concept of the Maiar gives such moments a coherent source without requiring the tale to explain each one from first principles.
Read on its own terms, The Lord of the Rings almost never invokes the Maiar as a category at all; a reader meets Gandalf, Saruman, and the nameless terror on the bridge of Khazad-dûm simply as individuals of formidable and unexplained power, their true order left to surface, if at all, only in the appendices or in works published after the author's death. This withholding gives the story a second layer available on rereading: the same council chamber or mountain pass carries different weight once it is understood that the figures involved share an origin older than the world's shaping, so that what first reads as mystery becomes, on return, a matter of kinship and rank only gradually disclosed.
That shared origin also carries the story's clearest demonstration that inherited power settles nothing about conduct. Sauron and the wizards sent against him belong to the same order and once moved in the same company, yet the tale turns on the choices each made afterward rather than on any difference of kind between them; Tolkien himself described the Istari's restraint from matching Sauron's force with force as a deliberate limitation of a power they still possessed, so that their victory, when it comes, is won by counsel and endurance rather than by domination in kind.
Drafts and Variants
The collective term "Maiar" is a late arrival in the legendarium's development; it belongs to the Valaquenta text composed as part of the later, post-Lord of the Rings revision of the Silmarillion material, and Christopher Tolkien's commentary on that text traces how a fixed two-tier order of Ainur only crystallized at this stage. In the earliest layer of the mythology, the Book of Lost Tales, no equivalent single class-name is used for lesser divine spirits; instead the narrative speaks of beings such as the Manir and the Súruli, spirits of air and wind attendant on Manwë and Varda, alongside other unranked helpers of the great Gods, without organizing them into the systematic order of service later attributed to the Maiar.
The clearest case of a Maia whose identity shifted across drafts is Melian. In the Lost Tales she appears not under that name but as Gwendeling (also spelled Wendelin), a fay of twilight and shadow whose union with the Elven king, there called Tinwelint rather than Thingol, follows a markedly different narrative shape than the account later fixed in the published Silmarillion. Her reclassification as a Maia proper, sharing an order with figures like Ossë and Melkor, belongs to the same later systematizing phase that produced the Valaquenta, so that her early portrayal as a more freely conceived fairy-being was gradually brought into line with the fixed hierarchy of Ainur governing the finished legendarium.