The Xylella fastidiosa pathogen, which dries out trees leaving their leaves looking scorched, was found in June in almond trees near the town of Guadalest in the eastern region of Valencia, Elena Cebrian, head of the regional government's agriculture department, told AFP.
Tests carried out on olive trees in the same area came back negative. All trees and plants within a 100-metre radius of the almond tree that was found to be infected in Valencia are being destroyed.
The area is also being treated against insects which are suspected of transmitting the bacteria.
The bacteria, which emerged in 2013 in southern Italy and has also been detected in France, was found on Spanish soil for the first time in October in a cherry tree in the Balearic Islands.
The affected trees in two islands of the archipelago were destroyed as well as those in a 100-metre radius.
Local authorities also banned exports of plants from the Balearic Islands to prevent the bacteria, dubbed "olive tree leprosy" by some farming associations, from reaching mainland Spain.
Spain is home to around 340 million olive trees. It produces about half of the world's olive oil.