throw in your lot with decide to ally yourself closely with and share the fate of a person or group.
☞ Both this and the previous idiom come from the process of deciding something by drawing or casting lots.
2013Daily Telegraph Theresa May lost for a second time today after failing to deport an Ethiopian who had 'thrown in his lot' with Islamist extremists 'committed to terrorism'.