Historiography is the study of how history is written. One pervasive influence upon the writing of history has been nationalism, a set of beliefs about political legitimacy and cultural identity. Nationalism has provided a significant framework for historical writing in Europe and in those former colonies influenced by Europe since the nineteenth century. According to the medievalist historian Patrick J. Geary:
[The] modern [study of] history was born in the nineteenth century, conceived and developed as an instrument of European nationalism. As a tool of nationalist ideology, the history of Europe's nations was a great success, but it has turned our understanding of the past into a toxic waste dump, filled with the poison of ethnic nationalism, and the poison has seeped deep into popular consciousness.
Although the emergence of the nation into political consciousness is often placed in the nineteenth century, attempts by political leaders to craft new national identities, with their dynasty at the center, have been identified as early as the late Roman Empire. The Barbarian rulers of the successor states crafted these new identities on the basis of descent of the ruler from ancient noble families, a shared descent of a single people with common language, custom, and religious identity, and a definition in law of the rights and responsibilities of members of the new nation.
The eighteenth and nineteenth century saw the resurgence of national ideologies. During the French revolution a national identity was crafted, identifying the common people with the Gauls. In Germany historians and humanists, such as Johann Gottfried Herder and Johann Gottlieb Fichte, identified a linguistic and cultural identity of the German nation, which became the basis of a political movement to unite the fragmented states of this German nation.