Fabian Picardo said he would support anything that would have a "deterrent effect", following the latest incident, in which a Spanish state research vessel ignored orders to leave for more than 20 hours.
He hoped the situation was a long way from shots being fired but warned that Spanish police boats risked being mistaken for terrorists if they cannot identify themselves as friendly vessels.
Since Prime Minister Mariano Rajoy took office in December 2011, the level of unlawful incursions by Spanish state vessels into British territorial waters around Gibraltar has surged from five a month to around 40.
"They are going to be doing this whilst they are in government if we do not check them," Picardo told BBC radio.
"They are fully aware of that and they are needling away at the United Kingdom and Gibraltar by taking such action."
Asked about the prospect of an increased military presence in Gibraltar, Picardo said: "I would be in favour of anything that has a positive deterrent effect.
"I have discussed before the possibility of more senior assets from the Royal Navy being put at the disposal of the commander of British forces in Gibraltar."
Britain hauled in Spain's ambassador on Tuesday for a dressing-down over the latest incursion — the third time the ambassador has been summoned under Rajoy.
"Calling in an ambassador, especially one that is an ambassador for an EU partner and a NATO ally, is quite a dramatic step and Spain needs to realize that," said Picardo.
"In the full glare of publicity, this is not where they want to be."
Asked how close the situation was to shots being fired, Picardo said: "I certainly hope that we are not close to that at all and never will be."
But he warned of the possibility of misunderstandings "as a result of Spanish Guardia Civil vessels coming into (Gibraltar's territorial waters), without warning, coming in from the sun, where they are not visible to those who are carrying out refuelling or replenishment operations".
"It's a security issue that Spain need to be aware of also."
Spain ceded Gibraltar to Britain in perpetuity in 1713 but has long argued that it should be returned to Spanish sovereignty.