defected
When someone defects, they switch their allegiance from one side to the other. This can be a political defection, a religious defection, or a defection in any other kind of war.
The soldier defected to the opposing side, and now he's fighting for them.
He defected from the church, and now he's a atheist.