This term is also applied, often pejoratively, to anyone who switches loyalty to another religion, sports team, political party, or other rival faction. In that sense, the defector is often considered a traitor by their original side.
The physical act of defection is usually in a manner which violates the laws of the nation or political entity from which the person is seeking to depart. By contrast, mere changes in citizenship, or working with allied militia, usually do not violate any law.
For example, in the 1950s, East Germans were increasingly prohibited from traveling to the western Federal Republic of Germany where they were automatically regarded as citizens according to Exclusive mandate. The Berlin Wall (1961) and fortifications along the Inner German border (1952 onward) were erected by Communist German Democratic Republic to enforce the policy. When people tried to "defect" from the GDR they were to be shot on sight. Several hundred people were killed along that border in their Republikflucht attempt. Official crossings did exist, but permissions to leave temporarily or permanently were seldom granted. On the other hand, the GDR citizenship of some "inconvenient" East Germans was revoked, and they had to leave their home on short notice against their will. Others, like singer Wolf Biermann, were prohibited from returning to the GDR.
During the Cold War, the many people illegally emigrating from the Soviet Union or Eastern Bloc to the West were called defectors. Westerners defected to the Eastern Bloc as well, often to avoid prosecution as spies. Some of the more famous cases were British spy Kim Philby, who defected to Russia to avoid exposure as a KGB mole, and 22 Allied POWs (one Briton and twenty-one Americans) who declined repatriation after the Korean War, electing to remain in China.
When the individual leaves his country and provides information to a foreign intelligence service, they are a HUMINT source defector. In some cases, defectors remain in the country or with the political entity they were against, functioning as a defector in place. Intelligence services are always concerned when debriefing defectors with the possibility of a fake defection.