AMMAN (Reuters) - Twelve people died in heavy rains and flooding in parts of Jordan on Friday and authorities evacuated foreign tourists from the ancient city of Petra and other popular destinations, officials said on Saturday.

The country has recently been hit by flash floods and heavy downpours. In the worst incident, 21 people - mostly school children on an outing to the Dead Sea - were killed as torrential rains poured through valleys and deep ravines.

Over 3,500 visitors were taken to safe areas on Friday before flash floods inundated parts of the southern mountainous city of Petra famous for its carved rock ruins, government spokeswoman Jumana Ghunaimat said.

Authorities banned all tourist trips and declared a state of emergency in the Red Sea port city of Aqaba further south as downpours continued for a few hours before subsiding overnight.

The authorities said on Saturday they had evacuated hundreds of families living in makeshift tents in outlying rural and desert areas and scattered settlements in villages in the southern parts of the country that were hardest hit.

They included families of Syrian refugees who work as shepherds and farmers, officials said.