The Spanish monarch made the admission in a confidential meeting with Sir Richard Parsons, the British Ambassador in Spain at the time.
Details of the talks were released by the UK’s National Archives on Friday along with many other government documents from thirty years ago.
"The King emphasized, as he had done with me before, that that requirement was to take some step over Gibraltar which would keep public opinion quiet for the time being," the UK’s Express quoted Parsons as saying.
"It should be clearly understood in private by both governments that in fact Spain did not really seek an early solution to the sovereignty problem.
"If she recovered Gibraltar, King Hassan of Morocco would immediately activate his claim to Ceuta and Melilla."
Spain has held both north African cities since 15th and 17th centuries after a series of struggles with other competing countries, chiefly Portugal.
"The two foreign ministers should reach a private understanding between each other, differentiating between their actual aim and the methods used to propitiate public opinion on both sides."
According to the document in the National Archives, the King made the comments on July 21st 1983 at a time when the border between Spain and the tiny British held territory was still closed.
The UK government had already threatened to block Spain’s application to join the European Economic Community if it didn't lift border restrictions on Gibraltar put in place by General Franco in 1969.
Another meeting between Parsons and the UK’s Foreign Secretary at the time, Geoffrey Howe, shows how post-dictatorship Spain was willing to pay heed to Britain's diplomatic requirements:
"Morán (Spain’s Foreign Minister) said, as did the King yesterday, that he was more than ever convinced that there should be early confidential talks between you and him," Howe told Parsons.
"It is perhaps no bad thing that Spanish public opinion, as well as the Spanish government, have begun to understand that the principal aim of Spanish foreign policy, entry into the community, could be shipwrecked on the Rock of Gibraltar."
When Morán and Howe met on September 6th 1983, Ambassador Parsons wrote that both men "gave a frank exposition of their views on Gibraltar."
"Morán said that Spain's ultimate objective must be the recovery in due course of the territory of Gibraltar.
"He understood Britain's position and her commitment to the Gibraltarians," Parsons added.
“The Spanish Government wanted good relations with Britain."
Diplomatic talks and the opening of the border with Gibraltar in 1985 paved the way for Spain joining the EEC the following year.
The release of the confidential documents follows six months of heightened tensions between Spain and the tiny British Overseas Territory which began when Gibraltar placed concrete blocks off its shore in July.
Spain claimed the move would prevent their fishing fleet from accessing traditional fishing grounds, and retaliated with thorough custom checks at the Spain-Gibraltar border.
This in turn led to queues and a return to diplomatic wrangling between Spain, UK and Gibraltar.