Iran's President also slammed the comments made by his US counterpart, Donald Trump, regarding the rallies.
"Anyone who calls the Iranian people terrorists does not have the right to sympathize with the people," Rouhani said.
Rouhani made these remarks on Sunday during a cabinet meeting after four days of protests against price increases and corruption.
Two people died on Saturday in the western Iranian province of Lorestan during the protests, the deputy governor of the province Habibollah Khojastepour said.
Khojastepour said the death of the two civilians on Saturday night in the city of Dorud in Lorestan, adding that the authorities wanted to disperse the demonstrations peacefully, according to the semi-official ISNA news agency.
He alleged that "takfiris" (Sunni extremists) and foreign intelligence services had been involved in the protests in Dorud, which he characterized as riots.
Some of those arrested were later released, while others were remanded to custody, Naserbajt told the ILNA news agency.
Illegal rallies took place in Tehran and security forces were deployed to prevent harm to civilians, Naserbajt said.
Authorities have blocked access to certain social media networks following the protests that started on Thursday.
Jabar Zada said authorities were conducting investigations to find out who was behind the protests.