Loyalty oaths are formal declarations in which individuals pledge allegiance to a government or organization, often asserting their commitment to its principles and values. During the era of McCarthyism and the Red Scare, these oaths became a tool for screening public employees and others, aiming to root out suspected communists and subversives in the wake of widespread fear of communist infiltration.