Hazrat Sha'bi (may Allah have mercy on him) said: A Muslim prisoner who is in the custody of the enemy—if he remains firm on his religion—then he becomes an heir and inheritance can also be taken from him.
Hadith Referenceسنن سعید بن منصور / كتاب الجهاد / 4006