The founder of Telegram forwarded a message through the app's official channel, disagreeing with the announcement to restrict algorithms.
Spain has accused Telegram of spreading misinformation after the platform's founder, Pavel Durov, sent an in-app message to all users in Spain criticising draft social media legislation proposed by Prime Minister Pedro Sanchez.
"Do we want a technology that normalises and amplifies deception? That transforms privacy into a commodity? A society where a techno-oligarch can interfere, as one of them did yesterday, in the mobile phones of millions of citizens to tell them lies?" Sanchez said on Thursday.
"The answer must be a clear no, and we will not give in," he added.
In a message sent to all Telegram users in Spain on Wednesday afternoon, the Russian technology entrepreneur accused Sanchez's government of "pushing dangerous new regulations that threaten your internet freedoms" and warned the measures could turn Spain "into a surveillance state under the guise of 'protection'".
Durov also criticises Sanchez's announcement this week of a plan to ban children under 16 from social media platforms, making their managers legally responsible, criminally prosecuting anyone who manipulates algorithms and criminalising offences such as deepfakes.
"These are not safeguards; they are steps towards total control. We've seen this script before - governments weaponising 'security' to censor their critics. At Telegram, we prioritise your privacy and freedom: strong encryption, no backdoors and resistance to excess," the Russian-born founder said.
In his message, Durov expressed concern that the possibility of authorities demanding data to track the identity and age of users could lead to a situation of government censorship.
However, it is not yet known how Spain will monitor the age of internet users.
Under the proposed legislation announced by Sanchez on Tuesday at the World Government Summit in Dubai, social media platforms would be banned for children under 16 and platforms would be required to implement age verification systems.
The announcement also drew criticism from Elon Musk, who said, "Sanchez is the true fascist totalitarian".
Spain and much of Europe are following in the footsteps of Australia's world-first social media ban for children under 16 launched in December.
Australia's internet regulator said last month that social media companies have removed around 4.7 million accounts held by under-16s to comply with the law, which came into effect on December 10.