Answer
Spain was the country where Scarlatti spent a significant portion of his life. He arrived in Spain in 1729 and remained there until his death in 1757. During his time in Spain, Scarlatti composed a vast number of keyboard sonatas, which are considered among his most important works.