Quito is the second largest city in Ecuador after Guayaquil . With a population of 1,397,698 according to the last census ( 2001 ) , and , as estimated by the municipality , approximately 1,504,991 in 2005 , Quito is the second most populous city in Ecuador , after Guayaquil . It is also the capital of the Pichincha province and the seat of Metropolitan District of Quito .