Britain has called the opening of a diplomatic bag by the Spanish Guardia Civil at the border with Gibraltar "a serious infringement" of the Vienna Convention on Diplomatic Relations.
The incident occurred on Friday as the bag was taken from Gibraltar to Spain.
The Foreign Office said the British embassy in Madrid had made a formal diplomatic protest.
It comes a week after the UK protested about a Spanish incursion into Gibraltarian waters.
The Foreign Office would not comment about what was in the bag but a spokesman said: "Protocol concerning official correspondence and the diplomatic bag is governed by the 1961 Vienna Convention on Diplomatic Relations.
"We take very seriously any reported abuse of the protocol surrounding official correspondence and the diplomatic bag. We have asked the Spanish authorities to investigate what occurred and take action to ensure it does not happen again."
He added: "As far as we are concerned there is no justification for this infringement of the UK's rights under the Vienna Convention. Official correspondence and diplomatic bags are inviolable."
The Foreign Office would not comment on how the bag was being transported across the border.
This latest spat comes a few days after Foreign Office minister Mark Simmonds told MPs that Britain was reviewing its naval policy around Gibraltar following an illegal incursion into its territorial waters by a Spanish state vessel.
The RV Romon Margalef was challenged by the Royal Navy after it refused to leave Gibraltar waters after 22 hours despite repeated requests.