Muslim merchants migrated east to the land of Tang, Changan and other Chinese cities, Some merchants returned to their lands but others remained in those lands with the Tang emperor's permission and also allowed them to marry Chinese women. In Islam, Muslim children were also Muslims and the religion in the East rose.
The war ended in Spring, 1865. Robert E. Lee surrendered the last major Confederate army to Ulysses S. Grant at Appomattox Courthouse on April 9, 1865. The last battle was fought at Palmito Ranch, Texas, on May 13, 1865.