The Huéscar-Danish War was a conflict between Huéscar and Denmark.

Beginning 
When Spain was signing the treaty with France, it agreed to follow the same military policy with respect to Great Britain.  But when everything was going well, Spain sent 13,000 soldiers to Denmark to make sure that France and Napoleon didn't take it. The people of Huéscar did not really have the means to wage war against an entire country, with only 8 municipal guards.

The "War" 
The "War" lasted 172 years, and no soldiers were wounded or died.  The Supreme Council of Spain was aware of this situation already in 1809 and its position was clear: it immediately cut off all relations with Denmark. This news reached the town council of Huéscar, which, without hesitation, decided to declare war on the whole country.

End 
The "War" was forgotten about until the leader of Huéscar shook hands with the leader of Denmark in 1981.

References 

Peninsular War
History of Granada
Wars involving Denmark
Wars involving Spain
1800s conflicts
Denmark–Spain military relations