This cable (below) from the US Embassy in Portugal to the U.S., found and leaked by Wikileaks, shows that there were ongoing discussions between the Portuguese and U.K. governments about the Madeleine McCann case (see especially bits in red):
Friday, 28 September 2007, 15:36
C O N F I D E N T I A L SECTION 01 OF 02 LISBON 002527
SIPDIS
STATE FOR XXXXXXXXXXXX
EO 12958 DECL: 09/25/2017
TAGS PGOV, PREL, OFDP, PO
SUBJECT: PORTUGAL: UK AMBASSADOR ON ENERGY SECURITY,
RUSSIA, EU-AFRICA SUMMIT, AND MCCANN CASE
Classified By: XXXXXXXXXXXX FOR REASONS 1.4 (B),(D)
SUMMARY
-------
1. (C) On September 21, newly-arrived British Ambassador Alexander Wykeham Ellis informed Ambassador Hoffman that European concerns over Russia's aggressive energy policies and the need for market competition were the driving forces behind the third EU energy liberalization package. He suggested that Russia's position with its neighbors was guided by a self-proclaimed right to do "what it wants, when it wants" in its own neighborhood. Regarding Robert Mugabe's participation in the proposed EU-Africa Summit, Ellis said the UK would not discourage other member states from participating if PM Brown stayed away. He doubted, however, if the Dutch, Irish, or Swedish would attend in Brown's absence. Ellis also noted that it was the British police that developed the current evidence against Madeleine McCann's parents in the high-profile case that has captured international attention. He informed the Ambassador that former British Ambassador John Buck had accepted a private-sector position at a UK gas company and that his departure had nothing to do with bilateral issues. END SUMMARY
(...)
THE MADELEINE MCCANN CASE
-------------------------
5. (C) Madeleine McCann's disappearance in the south of Portugal in May 2007 has generated international media attention with controversy surrounding the Portuguese-led police investigation and the actions of Madeleine's parents. Without delving into the details of the case, Ellis admitted that the British police had developed the current evidence against the McCann parents, and he stressed that authorities from both countries were working cooperatively. He commented that the media frenzy was to be expected and was acceptable as long as government officials keep their comments behind closed doors.
It is clear that by late September 2007 Goncalo Amaral had had what he felt were strong indications that British police officers, i.e. those from Leicestershire Police, were basically trying to defend the McCanns. One evening he poured out his frustrations to a journalist, but clearly didn't make sure that his comments were 'off the record'. When his comments were published, the Portuguese evidently decided there was no better time to move against Amaral.
The Lisbon summit was 17 & 18 October 2007 and it paved the way for the grand signing ceremony which I think someone up the thread said was on 13 December. It is on the record that the Portuguese Prime Minister Jose Socrates, now on trial for major corruption, and Gordon Brown specifically discussed Madeleine McCann when they met during the conference.
Already in late 2007 and early 2008 there was a corruption enquiry going on by the Portuguese authorities and the E.U. justice arm, EUROJUST, into a bribery scandal in connection with the major Freeport development on the Algarve, which broke all manner of E.U. environmental regulations. Specific information was received by the EUROJUST investigation that bribes were paid via British banks to Socrates and the then Agriculture Minister.
No doubt both governments had plenty of dark issues they wanted to keep well and truly under the carpet.
Or 'behind closed doors', as the U.S. Ambassador put it in his communique about Madeleine McCann.