Another eight people were injured and three others trapped in the landslides at quarries on the outskirts of Quito, the country's risk management agency said on Twitter.
A landslide also engulfed a vehicle on a road north of the city, but the driver escaped unharmed, rescue workers said.
Authorities closed roads around the capital in case of more landslides, and also shut the Quito airport.
The quake lasted more than 20 seconds and caused panic in Quito, where residents evacuated buildings after it struck at 2:58 pm (1958 GMT).
Also Read
She said the quake had opened a crack in one wall of her house and caused several plates to fall and break.
The country's Geophysics Institute said the quake ocurred at a depth of five kilometers (three miles) and was followed by a forceful aftershock. It warned that more small aftershocks were possible.
Emergency services said the epicenter was near Mitad del Mundo, a tourist attraction at the equator where a monument is being built at the dividing line between the northern and southern hemispheres.