It was sometime in December of 1945 when three brothers, fellahin from the village of al-Qasr (see detailed map below) unearthed an ancient jar at the foot of the cliffs of the Jabal al-Tarif west of the village of Hamrah Dun.  Although they could not know it at the time, it was a discovery of enormous import.

The jar contained texts written on papyrus and bound into codex form, and the contents of those codices turned out to be texts that were most likely declared to be heretical in the fourth century AD and were thus buried to escape detection and destruction -- destruction that was so thorough that the teachings in these texts were almost completely eradicated and could only be pieced together by inference from writings by those who were on the side of those ordering their destruction and who were denouncing the doctrines that were preserved in the codices inside this ancient jar.

The discovery, then, opened a window onto a part of the ancient world that had been sealed off for centuries, an imperfect window to be sure, but since all the other windows onto that view had been deliberately smashed and bricked over (so to speak), it was an important window indeed.

These texts would come to be called the "Nag Hammadi library," and they would take a rather circuitous path to publication and translation, but they are now available to the public (since 1975) and can be found online in various places, such as here.  

The story of their discovery has been told by Professor James M. Robinson, who was responsible for tracking down the discoverers and determining the approximate date of their discovery (which had not been previously specified beyond a range of years), as well as for much of the analysis of the texts and their significance.  He spoke in person with the field hand who discovered the texts, and in an essay entitled "Nag Hammadi: the First Fifty Years" published in the Proceedings of the 1995 Society of Biblical Literature Commemoration, explains that the three brothers, named Muhammad Ali (the eldest brother), Khalifa Ali, and Abu al-Magd, were digging for fertilizer in the talus at the foot of the Jabal al-Tarif.  From his interviews with Muhammad Ali, Professor Robinson discovered:
When the local sugarcane harvest was over and the land lay fallow during the brief winter, he regularly dug soft earth at the foot of the cliff that served as fertilizer for the fields.  He had been digging fertilizer, he recalled, just a few weeks before the Coptic Christmas, which is January 7, when he made the discovery.  [. . .]

Muhammad Ali at first feared to open the jar (sealed with a bowl attached with bitumen to the mouth of the jar) lest it contain a jinn.  But then it occurred to him it might contain gold.  This gave him courage enough to break it with his mattock.  Out flew, into the air, what he thought might be an airy golden jinn, but which I suspect was only papyrus fragments.  He was very let down to find only worthless old books in the jar.  

He tore some up to share with some of the other camel drivers who were present, which explains some of the damage and loss which does not fit the pattern of what one would expect from the gradual deterioration of the centuries.  Since the other camel drivers, no doubt out of fear of Muhammad Ali, declined his insincere offer to share, he stacked it all back up together, unrolled his turban from around his head, put the codices in it, slung it over his shoulder, unhobbled his camel, drove back home, and dumped the junk in the enclosed patio in his house where the animals and their fodder were kept.  His mother confirmed to me that she had in fact burnt some along with straw as kindling in the outdoor clay oven.
We will probably never know what was on those texts that helped light the outdoor clay oven.  However, scholars have since determined that the jar contained thirteen codices (the twelfth was probably sacrificed as kindling, according to the analysis done by Professor Robinson, and only one text and the opening of another text from the thirteenth survive, having anciently been stuffed inside the cover material of the sixth codex), and that the surviving library of texts number forty-seven (not counting additional fragments and duplicates).  They have been given the name "the Nag Hammadi texts" or the "Nag Hammadi library" after the largest village near the cliffs where they were found (circled in green in the map above and notable for a bridge there across the Nile; the jar itself was found closer to Hamrah Dum, which is circled in red and has a red arrow pointing toward the cliff area one kilometer west, where Muhammad Ali told Professor Robinson he and his brothers discovered the jar; they were from the village of al-Qasr south of Hamrah Dum and circled in blue).

Nag Hammadi is located near the dramatic bend in the Nile just north of Luxor, which in ancient Egypt was called Thebes, the mighty ancient capitol of Upper Egypt (southern Egypt, the "upstream" and thus "upper" portion of Egypt, since the Nile flows south-to-north).  The map below shows the region and its terrain, along with a red arrow indicating Nag Hammadi and a blue arrow indicating the Jabal al-Tarif below whose cliffs the jar was buried.

Note that the terrain of Egypt shows clear geological evidence of massive water movement which shaped the severe terrain in the vicinity of Nag Hammadi and Luxor.  The deep gullies and wadis with their serpentine branches were probably formed by outrushing groundwater erupting and pouring out into the channel that would later hold the Nile River, when the entire area was covered by water that was trapped after the global flood described in the hydroplate theory of Dr. Walt Brown.  When this trapped water was rapidly and violently released and drained into the Mediterranean (probably due to the Mediterranean's breaching of the Dardanelles and Bosporus and the rapid filling of the area now covered by the Black Sea -- as that water flowed east, the water that had covered Egypt flowed out and into the now-lower Mediterranean; this aspect of the hydroplate theory is discussed on this page of Dr. Brown's book, towards the bottom of that web page, just above the inset entitled "Prediction 3").  

Dr. Brown discusses similar canyons to those seen in the terrain map above, but in the vicinity of the Grand Canyon.  There, many deep canyons are also seen which he describes in the section entitled "Side Canyons" a little less than halfway down this page, saying, "These side canyons also have their own side canyons, all connected like branches on a big, bushy tree. Surprisingly, most side canyons, at least today, have no source of water that could have carved them—or basins above that could have held much water."  On this later page, also dealing with the geology in and around the Grand Canyon in Arizona, Dr. Brown explains that the side canyons and barbed canyons there were most likely carved by water from the water table that had previously been much higher (before the trapped inland seas or giant lakes breached and lost all their water) erupting out of the flanks of the cliffs that today are high and dry (see his sections called "Side Canyons of Marble Canyon and Grand Canyon" and also "Barbed Canyons," both about halfway down the web page). 

To see where this particular Nag Hammadi and Luxor portion of the Nile fits into the larger picture of Egypt, see the map below.  Similar geological signs of catastrophic water outflows can be seen further east, where the outflowing water ended up in the Red Sea and connected ultimately with the Arabian Sea and Indian Ocean:

Getting back to the incredibly important texts found buried in that ancient jar at the base of the Jabal al-Tarif, they have been generally categorized as reflecting a "gnostic" understanding of the origin of mankind and our purpose here in this life, a perspective that is at odds with the understanding that would become the teaching of orthodox Christianity and which would therefore be violently declaimed against and apparently was stamped out.  The texts are described by Marvin Meyer in his 2005 book The Gnostic Discoveries: The Impact of the Nag Hammadi Library as follows: 
Research on the Nag Hammadi library and the Berlin Gnostic Codex [also found in Egypt but in the late 1800s, which appears related in its contents to the Nag Hammadi texts and which contains four texts] has disclosed a broad spectrum of perspectives among the texts that may be identified as gnostic or gnosticizing, and the texts seem to fall roughly into five groups.  These five groups may reflect, for several of the groups, gnostic schools of thought embraced by teachers and students in communities.

The first group of gnostic texts in the Nag Hammadi library consists of the Thomas texts: the Gospel of Thomas, the Book of Thomas, and probably the Dialogue of the Savior. [. . .]

The second group of texts derives from the Sethian school of thought.  Sethian texts reflect traditions of Seth, son of Adam and Eve, as a paradigmatic human being. [. . .]

The third group of gnostic texts represents the Valentinian school of thought.  Valentinus was a second-century Egyptian who became a Christian gnostic teacher and preacher in Alexandria and Rome. [. . .]

The fourth group of gnostic texts in the Nag Hammadi library comes from the Hermetic heritage.  The Hermetic tradition has been known for a long time, and Hermetic texts, collected in the Corpus Hermeticum, have assumed a prominent place in discussions of mystical religion in antiquity and late antiquity. [ . . .]

[. . .]  Within the texts of the Nag Hammadi library there are three Hermetic texts, two previously known, an excerpt from the Perfect Discourse and the Prayer of Thanksgiving, and one new Hermetic text, the Discourse on the Eighth and Ninth.  

The fifth group of gnostic texts in the Nag Hammadi library and the Berlin Gnostic Codex is hardly a definable group, but instead consists of those gnostic texts that defy classification.  These texts seem to incorporate leading gnostic themes, as suggested above, and may show similarities to other gnostic texts and traditions, but they do not fit neatly into the other groups of gnostic texts.  48 - 52.
Such is the categorization suggested by Marvin Meyer and other scholars.  Others may perhaps organize or categorize them differently.  However they are categorized, their significance is profound on many levels and for many reasons.  First, as Marvin Meyer explains elsewhere in the same book, "Prior to the discovery of the Nag Hammadi library, 'gnosticism' typically was considered to be an early and pernicious Christian heresy, and much of our knowledge of gnostic religion was gleaned from the writings of the Christian heresiologists, those authors who attempted to establish orthodoxy and expose heresy in the early church. [. . .]  Since the discovery of the Nag Hammadi library and related texts, the study of gnostic religion and its impact upon ancient and modern religion has been fundamentally transformed" (1-6).

Second, the deliberate burial at the base of a cliff after sealing the texts into a jar suggests that those who valued these texts were hiding them from those who wanted to suppress or even destroy them, and this brings up the entire theme of the destruction of ancient knowledge which has appeared in previous posts such as this one and this one.   Marvin Meyer provides evidence that these texts may have been buried upon the publication of the Festal Letter of Athanasius, Archbishop of Alexandria, in AD 367 (also known as the 39th Festal Letter (Meyer 30-31).  This letter lists the texts considered canonical and condemns as heretical those that are "an invention of heretics."

Finally, the texts have great importance to us on their own merit, for the light they may shed upon the meaning of human existence and the nature of human consciousness.  For this, the reader is encouraged to examine them for himself or herself (again, they can be searched and read here).

There is also the matter of that mysterious report from the discoverer of the long-lost jar containing the library, who said that when he broke open the jar, out flew what "might be an airy golden jinn," but which Professor Robinson says he suspects was "only papyrus fragments."  I wonder . . .