 Following this attack, a peace treaty was signed between Johor and the Portuguese.In 1540, Alauddin Riayat Shah moved his capital to Johor Lama, which is closer to the estuary of Johor River.Johor was also threatened by Aceh, on the northern tip of Sumatra.