This is technically correct in concept, but not in practice, as organized religion existed long before the formalization of the nation-state. In fact, one can even argue that nationalism is an agnostic subdivision of organized theology since it utilizes identical symbol worship mechanisms.