The traditional author of the epic war poem the Mahabharata is credited as Vyasa, who was born from a line of sages and is closely associated with the god Vishnu.
The first part of the Mahabharata frames a backstory in which Vyasa and the popular elephant-headed god Ganesha devise an arrangement by which Vyasa will dictate the lines to follow while Ganesha writes them down. With this device, Vyasa establishes both the poem’s and his own divine authority as creation and creator, before telling the story of his humble, illegitimate birth to a wandering holy man and a boat-woman.
Despite these lowly origins, Vyasa’s beautiful mother will marry a king, and Vyasa will be raised as a prince, who will eventually father Pandu, from whom the Pandava dynasty will follow. The historical event at the center of the Mahabharata's narrative, the Kurukshetra War, was fought between two royal houses, the Pandava and the Kaurava, for control of ancient Indian kingdoms.
With the Pandava’s victory, India entered a new phase of peace and political stability. This glory, as suggested by the Mahabharata and its accompanying legends, is ultimately owed to Vyasa.