The Emirate of Granada was established in 1238. As the Reconquista was very successful after the conquest of Cordoba in 1236, the emirate officially became a tributary state in 1238 and was called the Kingdom of Granada. The Nasrid emirs and kings were responsible for building most of the palaces in the Alhambra. The "taifa" became a vassal state of the Christian kingdom of Castile for the next 250 years. The Nasrid sultans and kings paid tribute to the Christian kings and cooperated with them in the battle against rebellious Muslims under Castilian rule.