The Upper Devonian Three Forks Formation of the Williston Basin is an important reservoir interval in the Bakken petroleum system, with estimates suggesting greater than 3.7 billion bbl of recoverable oil. Detailed stratigraphic analyses are sparse, but current studies propose shallow marine, tidal flat, or coastal sabkha environments for its deposition. Based on stratigraphic, sedimentological, and petrographic analyses of 28 cores, we infer that the Three Forks Formation was deposited in a continental setting with little to no marine influence. The setting was subaerial to subaqueous environments comparable to those found in playa lake systems or continental sabkhas. Late Devonian paleography and tectonics provided the isolation and slow subsidence of the Williston Basin that led to the accumulation of the Three Forks Formation in a hot and arid climate. Occasional floods were responsible for the deposition of the terrigenous sediments, debrite-like deposits, reworking, bedforms, scouring, and erosional surfaces. Flood waters collected in ephemeral lakes and ponds evaporated, resulting in the deposition of subaqueous dolomite, anhydrite, and even halite. The ponds and lakes progressively evaporated and contracted until they eventually dried out. The drying is characterized by dewatering structures, subaerially exposed and transported sediments with ripples, scour surfaces, evaporite cemented surfaces, evaporite removal breccias, halite pseudomorphs, and a variety of cracks. Vertical successions record an upward trend of increasing proportions of subaqueous facies, indicating a transition from arid to relatively less arid climatic conditions during Three Forks deposition. This depositional system resulted in the accumulation of a complex mosaic of lithologies composed of different proportions and textures of silt-sized detrital dolomite and quartz, clay, and evaporites in patchy to bull’s-eye configurations. This depositional model provides a coherent understanding of the existing depositional lithofacies and their petrophysical and geomechanical properties and provides the background for the prediction of their lateral distribution from wire-line logs.