Britain summoned Madrid's ambassador on Tuesday over a "provocative" 20-hour stand-off between the Royal Navy and a Spanish state research vessel which refused to leave Gibraltar's territorial waters.
The Ramon Margalef, an oceanographic survey ship, entered the waters off the tiny peninsula on Monday but would not move despite repeated requests, said Britain's Foreign Office.
"I strongly condemn this provocative incursion and urge the Spanish government to ensure that it is not repeated," said Europe Minister David Lidington.
"We stand ready to do whatever is required to protect Gibraltar's sovereignty, economy and security."
He added: "We believe that it is in the interests of Spain, Gibraltar and Britain to avoid incidents such as this that damage the prospects for establishing dialogue and cooperation."
It is the third time that Britain has publicly summoned Spain's ambassador over Gibraltar since the current Spanish government took office in December 2011.
"Despite repeated diplomatic protests to Spain in relation to incursions into British Gibraltar territorial waters in recent months, a Spanish state research vessel, the RV Ramon Margalef, undertook significant surveying activity in British Gibraltar territorial waters on 18 and 19 November for over 20 hours," Lidington said.
"When challenged by radio, the vessel responded that it was conducting survey work with the permission of the Spanish authorities and in the interests of the European Community."
Spain ceded Gibraltar to Britain in perpetuity in 1713 but has long argued that it should be returned to Spanish sovereignty.
London says it would not do so against the wishes of Gibraltarians, who are staunchly pro-British.