Answer
Spain supported Ferdinand against the Republic of Venice during the Uskok War in 1617–18. Ferdinand was the Holy Roman Emperor and the King of Hungary, and Venice was a rival power in the region. Spain was interested in maintaining its influence in the area and saw Venice as a threat. The war was fought over control of the Adriatic Sea, and ended with a stalemate.