The Tang dynasty let in foreigner's into their country. The
decline of Buddhism and conflicts between the Chinese foreigners
was what started this, you know the Tang dynasty not letting them
in. Then later on cultural exchange and new religions where
introduced to China.