Abstract. We analyze the geometric foundations of classical YangMills theory by studying the relationships between internal relativity, locality, global/local invariance, and background independence. We argue that internal relativity and background independence are the two independent defining principles of Yang-Mills theory. We show that local gauge invariance -heuristically implemented by means of the gauge argument -is a direct consequence of internal relativity. Finally, we analyze the conceptual meaning of BRST symmetry in terms of the invariance of the gauge fixed theory under general local gauge transformations.