The foreign ministers of Britain and Spain are to meet in Gibralter on 21 July.
It will be the first visit to Gibraltar by a Spanish minister since Britain took the territory in 1704.
The Gibraltar government said on Friday Miguel Angel Moratinos of Spain, David Miliband of Britain and Gibraltar Chief Minister Peter Caruana will meet following the "resolution" of dispute over territorial waters.
The statement did not say how the dispute had been resolved.
Spain ceded Gibraltar to Britain under a treaty signed in 1704 but maintains the peninsula should be returned to Spanish sovereignty.
The provincial government wants to remain under British rule and Britain has said it will not hand the territory back to Spain against wishes of the people of Gibraltar.