Let’s face it – anyone whose résumé includes the medieval rape-revenge film The Virgin Spring (1960), the terminally gloomy Cries and Whispers (1972) and, lest there be any doubt to potential cinema patrons, the aptly named It Rains on Our Love (1946) is unlikely to be the first name on your list of comedy directors. And yet throughout Ingmar Bergman’s career there are streaks of (admittedly black) humour and even out-right comedies: (All These Women (1964), for example, shows an affinity with the absurdities of life and come laced with an edge of surrealism. A Lesson In Love, we are informed as waltzing music box figurines love and leave each other, "might well have become a tragedy, but it turned out alright."

The film is described as "en komedi for vuxet folk av Ingmar Bergman" – a comedy for adults. It is an apt description, but useful to have at the start of the film – you might be unaware that this is a comedy when the opening line ("You wretch!") is spat out with venom at a bemused David, an emotionally bereft gynaecologist who doesn’t understand women. David has been having an affair, his first after many years of marriage, with the young and married Susanne, freeing his wife Marianne to dally where she pleases. It’s hardly surprising their daughter Nix is a bit confused, preferring the company of her dog and desperately trying to find ways to get a sex change operation. Clearly a separation is in the offing. At first his wife’s extra-marital affairs do not overtly bother David; after all he has philosophically pointed out that "infidelity is the creation of moralists," but when he finds out the new object of her affections is rotund sculptor, alcoholic and self-confessed genius Carl-Adam, he is deeply nonplussed. Carl-Adam had originally been betrothed to his wife. Now he’s determined to win her back, even if it means trawling the seedy bars of Copenhagen.

A Lesson in Love is a sophisticated comedy of infidelities employing a multiple flashback structure that shows us how the doctor’s twisted relationships have developed and inevitably deteriorated. It is the kind of dysfunctional family comedy that seems fresh and modern despite being fifty years old. Partly this is due to Bergman’s use of structure in a way that seems partway between the deliberately obtuse stylings of independent cinema and the cultural sophistication of, say, Max Ophuls, but partly because once again Bergman’s choice of subject matter is confrontational and controversial. Some of the more obvious laughs are comedy staples – the patient eagerness to strip for her doctor, the failure of simple gadgets that make the hero look ridiculous – but much lies with the mise-en-scene and deadpan dialogue. David is constantly spouting dime-store philosophical gibberish with the utmost sincerity ("The conjugal bed is love’s demise" he aphoristically pontificates) but it is the comedy of angst and despair.

Bergman is also able to inject some directorial flourishes that would be out of place in his more sombre films – a comic whip-pan to a train station, a sudden cuckoo clock interjection when Marianne bursts into a hotel room to find her husband caught in flagrante delicto. These all add an air of insanity to what could have, as the pre-titles suggest, easily been a tragedy. Similarly, we are presented with a cast that borders if not on the insane, then at least the neurotic. A birthday trip to grandfather’s becomes a web of subterfuge as the men try to sabotage the car to prevent yet another dreary picnic only to have the resourceful grandmother chirpily suggest a horse and carriage, much to the general chagrin of all. The most reflective character, the tomboyish Nix, acts like the precocious children in Hitchcock’s 1950s films as she both mirrors and criticises her warped parents.

In terms of theme and pre-occupation A Lesson In Love follows Bergman’s constant examination of the human condition, particularly in traumatic relationships and involving strong women. And it proves that the slightest skew in outlook can alter a melodrama into a sophisticated comedy. In lesser hands this would have been depressing, offensive or crass – as it is, it’s a refined comedy. For adults.