Nine years before Sister Act, in which Whoopi Goldberg sought sanctuary from her mobster beau in a convent, Spanish torch singer Cristina Sánchez Pascual was given shelter by Mother Superior Julieta Serrano after her boyfriend died after taking the heroin she scored for him.

A devoted fan of her guest, Serrano fervently believes that humans are 'the worst being in all creation' and has dedicated her life to saving lost souls. But times are changing and so must the methods of the Humbled Redeemers if they are to fulfil their mission and save their home.

Bringing Pedro Almodóvar together with several actresses who would become fixtures in his increasingly acclaimed pictures over the next decade, Dark Habits (1983) is usually dismissed as a something of a misfire. It has its adherents, but they usually content themselves with noting that it contained signs of a stylistic maturation after Pepi Luci Bom (1980) and Labyrinth of Passion (1982). These two films had gleefully captured the 'pasota' or 'couldn't care less' spirit of the counter-cultural movement known as La Movida Madrileña that had erupted in the period following the death of dictator Francisco Franco on 20 November 1975.

But, while Dark Habits retains the subversive edge and the kitschy look and feel that had characterised its predecessors, it is actually a much more conservative film. There are only hints of the strident anti-clericalism that had earned Luis Buñuel's scathing nun's story, Viridiana (1961), the censure of both El Caudillo and the Vatican, while it contains little of the nudity and sado-masochistic eroticism that had sustained the 'nunsploitation' movies that had been a staple of Italian and Spanish genre cinema since the early 1970s. Indeed, this owes more to Douglas Sirk than Joe D'Amato and, as a result, its quiet iconoclasm is all the more potent, as Almodóvar was less interested in depicting depravity than he was a sister act of sacrilegious salvation.

The project came about because multi-millionaire Hervé Hachuel asked Almodóvar to write a scenario for his girlfriend, Cristina Sánchez Pascual. Initially, the plan was to create a homage to the fabled collaboration between Josef von Sternberg and Marlene Dietrich, with Blonde Venus (1932) providing the key inspiration for a transcontinental journey of hedonism and self-realisation. However, on discovering the limits of Pascual's talent, Almodóvar quickly shifted the focus to the guardian nuns, who had been given degrading names by their Mother Superior to ensure their humility.

Each has a secret to hide. Sister Rat (Chus Lampreave) mines her experiences for the sensationalist novels she writes under the pen name Concha Torres, while the nurturing Sister Damned (Carmen Maura) harbours a Bengal tiger named El Niño, whom she wrestles and serenades on the bongos. In addition to having an affair with the chain-smoking chaplain (Manuel Zarzo), gardener Sister Snake (Lina Canalejas) also makes seasonal outfits for the convent statues, while cook Sister Manure (Marisa Paredes) is a reformed murderer, who assuages her guilt by lacing the meals with LSD. The latter's predilection for self-inflicted corporal punishment, along with the Mother Superior's drug dependency and lesbianism could have come out of any nunsploitation picture of the period. But Almodóvar resists castigating the sisters in the grand Buñuelian manner and even suggests a little compassion in having the Mother Superior admit that in her efforts to minister to prostitutes, thieves and addicts, she has become one of them.

As Almodóvar told one interviewer: 'the vocation of the nuns in my film is entirely Christian; they simply follow the words of Christ's apostolate. To save man, Christ became man and experienced man's weakness.' This contemporising of the New Testament message recalls fellow atheist Pier Paolo Pasolini's bid to present Jesus as a proto-Marxist in The Gospel According to Matthew (1964), which similarly strove to denounce the corrupt, hypocritical and detached Catholic Church rather than those living their faith by performing good deeds. There are also echoes of Pasolini's Theorem (1968) in Almodóvar's storyline, but the disruption of cloistered seclusion by an infelicitous outsider had already informed such intense wimpled dramas as Robert Bresson's Les Anges du peché (1943), Michael Powell and Emeric Pressburger's Black Narcissus (1947), Jerzy Kawalerowicz's Mother Joan of the Angels (1961) and its once-scandalous companion piece, Ken Russell's The Devils (1971).

What sets these Humbled Redeemers apart, however, is that they leave the convent from which ennobled benefactor Mary Carrillois is threatening to evict them. Outside they find sinners to save and start living among them, sharing their vices in a bid to understand them and the new democratic and secular Spain, in which all venal and the majority of mortal errors are no longer considered sufficiently heinous for the perpetrators to feel the need to seek God's redeeming grace.

The allegorical intention here is self-evident, but Almodóvar is also keen to explore the extent to which women are equal partners in the emancipation process and Rat, Snake, Damned and Manure are very much presented as sisters doing it for themselves rather than selfless angels of mercy, as the realities they encounter in their new vocation force them to forget idealised notions of Christianity and accept the true natures they had been repressing since taking their vows.

There may be something tritely melodramatic about the summation that saints and sinners need to be accepted for who they are, but Almodóvar has always insisted that people behave extremely under the influence of irresistible emotions. Hence, he asked cinematographer Ángel Luis Fernández and production designers Román Arango and Pin Morales to concoct a visual style that married the chiaroscuro of High Renaissance artist Francisco de Zurbarán with the gloss that Russell Metty and Alexander Golitzen created for Douglas Sirk's classic 1950s woman's pictures. Indeed, screen references abound, from the photos of Theda Bara and Marilyn Monroe on the Mother Superior's office wall to the lampooning of such sentimental religious sagas as Ladislao Vajda's Marcelino, Bread and Wine (1955) and the discussion of Cecil Beaton's costumes for George Cukor's My Fair Lady (1964).

Dark Habits was also a reaction against the ailing Luis Buñuel's severe denunciation of religion. Almodóvar saw nothing incongruous about earthly gratification being a fitting reward for spiritually motivated good works and any of the sisters could easily have echoed Anne Heywood as Mother Giulia in Domenico Paolella's The Nun and the Devil (1973), when she told her accusers 'The law of the church is inhuman, and it made me inhuman too, like you. But I know I have a soul. And at last I'm free.'

Paolella, who made Story of a Cloistered Nun later the same year, was the prime instigator of what came to be called nunsploitation and Gianfranco Mingozzi and Giulio Berruti followed his lead in Flavia the Heretic (1974) and The Killer Nun (1979) in exposing male fear of female sexuality. Walerian Borowczyk similarly considered the connection between power and pleasure in Behind the Convent Walls (1978). But the emphasis soon fell on softcore cavortings in the likes of Giuseppe Vari's Sister Emanuelle (1977), Joe D'Amato's Visions in a Convent (1979) and Bruno Mattei's The True Story of the Nun of Monza (1980).

Almodóvar must have known about these fetishistic romps and it is tempting to think that, in addition to challenging the Church to rethink its mission, he might also have been seeking to reclaim the convent picture from the smut pedlars and, in the process, inadvertently nudge it in the direction of Jonathan Lynn's Nuns on the Run (1990), Emile Ardolino's Sister Act (1992) and Hal Hartley's Amateur (1994).