The excavation of Ban Rai rock shelter (Pang Mapha district, Mae Hong Son Province, northwestern Thailand) has uncovered evidence relating to changing patterns of prehistoric human activity. Analyses of the excavation data, along with radiocarbon dating, have enabled the identification of two separate cultural components. The earlier component, the pre-Log Coffin culture, is dated by 14C to between ca. 12,500 and 8000 B.P. and is characterized by a wide range of lithics, an abundance of faunal remains, and a primary flexed burial. The second component, the Log Coffin culture, probably dates to ca. 2100-1200 B.P. and yielded human remains, potsherds, and iron tools, in addition to the log coffins themselves and their supporting posts. The composition of the artifact assemblages provided the main basis for the separation of the components, which has highlighted the changing use of the Ban Rai rock shelter from a primarily habitation to an exclusively burial site.