More than 20 people have died and 150 were injured by the quake which measured 6.2 on the Richter scale.
Eighty villages in Qazvin suffered between 20 and 100 percent damage, provincial Governor Massoud Emami told state television adding: "There have been victims."
Emami told state television he had put out a call for food and tents. Troops were mobilising to help the villagers.
The quake also shook several villages in Ghazvine, killing two people and wounding four others, reports said.
The United States Geological Survey said the tremor had a magnitude of 6.2.
Iran's state television later said there was an aftershock measuring 4.4 on the Richter scale.
A huge earthquake which devastated the Iranian city of Bam in southeast Iran in December measured 6.8 and killed more than 20,000 people.
The quake's epicentre is near to
the Iranian capital
State media put the epicentre at Chalus, a small town on the coast 70km north of Tehran, in a verdant area of resorts popular with people from the capital.
The earthquake shook buildings in Tehran and people in the streets screamed. People in west Tehran said some windows there shattered.
Television said rocks had poured down on to the road joining Tehran to the northern seaboard, but had not blocked it.
Iran's Caspian Sea is famed for its exports of caviar and is not an oil-producing region of OPEC's second biggest producer.