Spanish Economy Minister Nadia Calvin0 said she had noticed a growing rapprochement between Algeria and Russia at the spring meeting of the International Monetary Fund in April.
"I saw back then that Algeria was more and more aligned with Russia, so this (decision to suspend the treaty) didn't surprise me," Calvino said in an interview with Radio Catalunya.
The diplomatic row between the two countries followed a change of stance by Spain over Western Sahara, a territory Morocco claims while Algeria supports a group that seeks its independence.
Spain is also a member of the European Union and the NATO military alliance, both in the forefront of international opposition to Russia's invasion of Ukraine.
After Algeria's decision, Madrid has tried to convince the North African country to backtrack.
"I hope that Algeria will reconsider its position and the statements it has made," Calvino told reporters in Barcelona.
Algeria is one of Spain's main suppliers of gas and Spain has said it will firmly defend its national interests and those of its citizens and companies.
Calvino reiterated on Monday that the gas supplies continue normally and was confident there would be no disruption.