The actual Nyingma scriptures associated with this practice were supposedly hidden from the 9th century on, but were reclaimed at various times from the spiritual attainments of later teachers (tertons).
It is thought that Dzogchen was initially regarded as the ultimate meditative stage of deity yoga (c. 8th century).
In the Guhyagarbhatantra, Dzogchen is mentioned as a stage of meditative practice where one visualizes a deity and its mandala. Ultimately one completely merges with that deity and mandala. The resulting level of attainment is called Dzogchen.