The suspicious package was screened at the security checkpoint at the entrance. The building was evacuated after which the Tedax bomb disposal units arrived at the scene.
The streets adjacent to the ministry were cordoned off, and residents were urged to stay at home.
Although the package did not contain anything hazardous, the Civil Guard is said to continue the investigation.
In April, the Spanish minister of industry, trade and tourism, Reyes Maroto, received a red-stained knife along with a threatening letter sent to his office. Also in April, the leader of the left-wing party Unidas Podemos, Pablo Iglesias, Interior Minister Fernando Grande-Marlaska, and the head of the Civil Guard, Maria Gamez, were reported to have received threatening letters with bullet cartridges inside.