Algeria has suspended its 20-year-old treaty of friendship, good neighborliness and cooperation with Spain, state media reported on Wednesday.
No reason was given for the decision, which was taken by Algeria's top security council.
But tensions are simmering between Algiers and Madrid over recent Spanish comments on Western Sahara as Spain has shifted closer to Morocco's position on the conflict there.
In April, the Algerian-backed Polisario Front, Western Sahara's independence movement, said it was severing ties with Spain after Madrid backed Morocco's plan giving autonomy to the former Spanish colony.
Algeria is a key gas supplier to Spain, and is expected to review prices for any new gas contract with Spanish firms, a source familiar with the matter told Reuters.
The current gas contract with Spain is long term with prices well under the current market level, the same source, who asked not to be identified, told Reuters.