Our Lady of Fátima protects Portugal
With some justification Pope Pius XII claimed that the Virgin Mary had saved Portugal (for the Church). And indeed, the timely dedication of the nation to her Sacred Heart before the 1940 concordat and a papal pilgrimmage to her shrine in Portugal before the 2004 concordat seemed calculated to help the negotiations.
In 1931 Spain proclaimed the Second Republic, sending the king into exile. The response of the Portuguese bishops was swift: they erected a defence against the troubling events next door by dedicating Portugal to the Sacred Heart of the Virgin Mary.  Salazar, the right-wing dictator who came to power the next year, further fostered the link between Church and state. In 1938, as the Spanish Civil War raged just across the border, Portugal was again consecrated to the Virgin. This was done on the anniversary of her appearance before three Portuguese children at Fátima. In a speech to the people of Portugal Pius XII credited the Virgin with saving the country, as he spoke “of the red menace, so threatening and so close [in Spain], but avoided so unexpectedly.”  However, “unexpected” seems a curious word to use for the results of a Marian campaign which seemed expressedly designed for this end.
In order to get this symbolic church-state connection codified in a concordat, serious negotiations had already been begun in 1937. It was time for Salazar to confirm his role of protector of the Catholic Church which, of course, in turn protected his own rule. Yet, despite the good relations between Salazar and the Church
negotiations on the Concordat were long and complex. One of the sticking points was the ACP (Portuguese Catholic Action) , which Salazar was adamant should be excluded from the negotiation process. Salazar feared that ACP would be transformed into an instrument of Catholic political activity if the church were to insist on its inclusion, seek to guarantee its legal recognition or ensure conditions that would be favourable to its activities. [...] The negotiations on the Concordat also generated polemics on matters such as the prohibition of divorce to Catholics and the consecration of religious education in public schools. On these matters, Salazar was prudent: he feared the reaction by the regime's republican supporters and initially resisted Rome's demands. In the end, however, he consented. 
In 1940 these negotiations led to the signing of two concordats: one for mainland Portugal and a missionary accord for its colonies. The latter were called “overseas provinces” in order to evade the issue of decolonisation: no colonies, no problem.  Domestically, as well, Portugal remained an anachronism, with Portuguese society the most conservative in Europe. For instance, until after the death of Salazar in 1968 married women couldn't even get a passport or leave Portugal without their husbands' consent.  Salazar's regime outlived him by several years, but finally in 1974 it was ousted in the Carnation Revolution. The new Constitution of 1976 changed the repressive legal system, as did the implementation the same year of a Protocol to the concordat which finally permitted civil divorce for Catholics.
After this it took almost 30 years more for the dictator's concordat to be completely replaced. As before the stage was set by emphasising Portugal's protectress, Our Lady of Fátima. By the turn of the millenium, however, ceremonial dedications by bishops had been replaced by papal visits which were far more effective as media events as a way to renew emphasis on the Patroness of Portugal.
Of course, it is clear that Fatima was also of deep personal significance for John Paul II. Not only did the “Polish pope” share his country's devotion to the Virgin Mary, placing her initial and her colour on his papal coat of arms, he also came to regard her as his special protectress. On 13 May 1981, the anniversary of the Virgin's appearance in Fatima, he survived an assassination attempt, ostensibly because the bullet “followed a strange zigzagging trajectory, avoiding vital organs”.  He believed that the Virgin Mary had appeared in Portugal three years before he was born, in order to foretell the 1981 assassination attempt on him, (although, unfortunately she did so in such a cryptic manner that no one got the message until after the event). His earnest conviction was shown by the fact that the year after the attack he left one of the bullets in the crown of the Madonna at the Fatima shrine. 
The Pope's decision in 2000 to reveal this interpretation to the world as the last of the Three Secrets of Fátima and to visit her shrine to beatify “the two great Portuguese little ones” came at a politically convenient time. Also strategically opportune was his claim that “The special light that shone in their lives wants to illuminate the world. The world continues to look to Portugal with hope”.  For the Vatican and Portugal were about to start negotiating a new concordat.
It was the new Law on Religious Freedom that made it necessary to update the concordat. This law established a new religious legal framework which finally permitted religious pluralism.
The 2001 Religious Freedom Act [...] provides qualifying religious groups with benefits previously reserved for the Catholic Church: full tax-exempt status, legal recognition for marriage and other rites, chaplain visits to prisons and hospitals, and respect for traditional holidays. It allows each religion to negotiate its own concordat-style agreement with the Government, although it does not ensure the acceptance of any such agreements. 
The new concordat, signed and ratified in 2004, recognised for the first time the juridical personality of the Portuguese Episcopal Conference. It also allows the Catholic Church to receive 0.5 percent of the income tax that citizens can allocate to various institutions in their annual tax returns.
As they say in Portugal, “Maria ayuda” — “Maria helps”.
1. “The Consecrations of Portugal (1931, 1938) and Their Benefits”, Fátima Movement of Priests. http://www.fatima.org/essentials/facts/consecraport.asp
2. “Del peligro rojo, tan amenazante y tan cercano [en España], pero evitado de manera tan inesperada”. Fátima Movement of Priests, “La vidriera de Nuestra Señora”, . http://www.fatima.org/span/essentials/whatucando/fmp/chapter6.asp
3. “Founded in 1932 by Cardinal Manuel Gonçalves Cerejeira [Salazar's closest associate], the Portuguese Catholic Action was one of the movements that the Estado Novo [his regime] used to legitimise itself.” “Ação Católica Portuguesa”, Wikipedia. http://pt.wikipedia.org/wiki/A%C3%A7%C3%A3o_Cat%C3%B3lica
4. Ricardo E. Ovalle-Bahamón, “The wrinkles of decolonization and nationness: white Angolans as Retornados in Portugal”, in Andrea L. Smith, ed., Europe's invisible migrants, Amsterdam University Press, 2003, p. 149. Google reprint
5. Inge Ruigrok, reviewing The Last Empire: Thirty Years of Portuguese Decolonization, 2006. http://www.h-net.org/reviews/showrev.php?id=11405
6. “Family and Kinship Relations” and “Women”, Eric Solsten, ed., Portugal: A Country Study, Library of Congress, 1993. http://countrystudies.us/portugal/
7. “John Paul II, the Fatima Pope”, Zenit, 6 April 2006. http://www.zenit.org/article-15734?l=english
8. “Fatima's 'third secret' revealed”, BBC News, 13 May 2000.
In 1982, on the first anniversary of the assassination attempt he said in Fatima that “in the designs of Providence there are no mere coincidences”. It can be difficult for anyone without a scientific worldview to acknowledge the role of chance, especially when there is the comforting (and flattering) implication of being under divine protection.
9. “Pope encourages Portugal to form a critical conscience: the 'greatest cultural challenge' for today”, Zenit, 12 November 2004. http://zenit.org/english/visualizza.phtml?sid=61863
10. “Portugal”, International Religious Freedom Report 2006, [US] Bureau of Democracy, Human Rights, and Labor. http://www.state.gov/g/drl/rls/irf/2006/71401.htm