President Raisi charged that the two platforms, owned by US internet giant Meta, "were at the root of the insecurity in the country during the recent riots", speaking on national television Tuesday evening.
"The two platforms will only be allowed to operate if they have a legal representative in the country who is responsible for their users' activities," the president said.
Telecommunications Minister Issa Zarepour said Wednesday that the continued Whatsapp and Instagram blocks were approved by "the Supreme National Security Council in the presence of the president, the head of the judiciary and the head of parliament".
The online services were the most widely used in Iran after authorities earlier blocked access to Facebook, Twitter, YouTube, Telegram and TikTok.
The Islamic republic was rocked by major demonstrations after the mid-September death of Mahsa Amini, a 22-year-old Iranian Kurd, after her arrest for allegedly breaching the country's dress code for women.
Raisi also said that he had "told the country's leaders that internet disruptions were causing discontent" among the population of Iran, which has become a highly connected country in recent years.
Former government spokesman Ali Rabiei warned late last month that the activities of "about three million companies and the jobs of 12 million people" were linked to the internet in Iran.
Even before the protests, internet access was restricted and most foreign websites could only be accessed through virtual private networks.