As a life-long Mormon (so far), I've always known that one of the requirements to get into the celestial kingdom is to be a faithful member of the church (LDS, obviously). I have also often heard the question come up (and wondered it myself) whether if someone that's never heard of the church or its teachings would be penalized (not allowed into the highest kingdom) simply because they weren't members, and if that would even be fair. My teachers have always answered that question saying that everyone will have the chance to discover the church throughout their lifetime and whether they decide to explore it would be their choice, therefore making it fair for everyone. However, there are many countries on the Earth that do not give citizens the freedom of religion.
For example, the majority of people in China are unaffiliated with a religion and general Christianity only accounts for about 5% of the population. China only has 5 registered religious organizations, which are the Buddhist Association of China, Chinese Taoist Association, Islamic Association of China, Three-Self Patriotic Movement and Chinese Patriotic Catholic Association. Any religious groups outside of this can be subject to anything from harassment, forced conversion, imprisonment, and torture. These horrible consequences have happened many times before.
Now, for my question. In the scriptures, it has stated several times that it is very important to follow the laws of your country. So, say someone from China or anywhere with similar laws had discovered the church and had maybe even gotten to the point where they were praying and reading the Book of Mormon, etc. If they were to continue practicing Mormonism, would that be considered a sin if it is illegal in their country? And if so, how would they be able to enter the celestial kingdom without having to leave the country?
Please, only leave relevant answers! I have been wondering this for a while and I would like to see what other people think.