Where would Hollywood have been without Fredric March as Robert Browning or Dennis Price as Lord Byron, famous lovers in their day? Even an actor as normally straitlaced as Michael Redgrave once brought some moody charm to a portrayal of W.B. Yeats. Writers' lives are an endless source of inspiration.

But of all poets it was Dylan Thomas, the roistering, free-loving Welshman who enjoyed a pint or two (and drank himself to death in New York at the age of 39), who was closest in spirit to the film industry. During World War II, he produced scripts for British propaganda documentaries. He even wrote the screenplay of a vapid melodrama called The Three Weird Sisters, in which three old maids in a Welsh village plot the murder of their rich half-brother. All that is now forgiven.

In John Maybury's The Edge of Love, Thomas is played by the Welsh actor Matthew Rhys. It's not a full-scale biopic. The film covers four years in the poet's life during World War II, when he lived with two women: his wife Caitlin (Sienna Miller) and a former lover Vera Phillips (Keira Knightley), whom he met again by chance during the war. It seems he loved them both. The relationship of these extraordinary women -- to Thomas and to each other -- is at the heart of Maybury's absorbing film.

How it came to be made is a story almost as remarkable as that of the lovers themselves. Rebekah Gilbertson, the film's producer, is the granddaughter of Vera Phillips and William Killick. William, a war hero (played in the film by Cillian Murphy), married Vera while she was still in love with the poet. Gilbertson was inspired to make the film when she discovered a book about her grandparents, Dylan Thomas: A Farm, Two Mansions and Bungalow, by David Thomas, describing their tangled lives. Sharman Macdonald, who wrote the screenplay, is the mother of Knightley. The part requires Knightley to sing, and her mother included songs especially for her. Surely no film with such felicitous family connections deserves to do other than succeed.

We begin in London during the Blitz. Bombs are falling, sirens are wailing, and Phillips is singing to sheltering crowds in an underground Tube station. In a pub, by chance, she meets Thomas and discovers after all these years that he has a wife and child. Phillips and Caitlin form a friendship untroubled by jealousy or rancour and are soon sharing beds and bathtubs, listening to Thomas read his poems, exchanging intimate secrets and smoking their heads off, as everyone did in wartime. Caitlin turns out to be more experienced in the ways of the world ("My first was Augustus John, he seduced me when I was 15"). But it's the refined and soulful Phillips who stirs Thomas's deepest responses and eventually succumbs to his charms. In the meantime, she has reluctantly married Killick, who has seen her in the Tube station and been instantly captivated by her beauty (if not her singing).

It is an intense and strangely beautiful film, though Thomas himself may be its least impressive character. He is best remembered for Under Milk Wood, his verse radio play about a day in the life of the mythical Welsh village of Llareggub, whose name spelt backwards was not something polite English teachers drew attention to. I once had a vinyl recording of Richard Burton reading the poem (he appeared in a film of Under Milk Wood in 1971), and I've never forgotten the creamy, seductive quality of his voice. The legendary charisma, the magnetism of the man, is something I missed in Rhys's performance. Thomas comes across as a strangely pallid, even secondary, figure compared with the women in his life.

In his previous film, Love Is the Devil, Maybury explored the turbulent life of painter Francis Bacon and his sadomasochistic relationship with his lover and model, George Dyer. The Edge of Love seems to me a richer and more satisfying film. If you ask what insights it offers into the springs of Thomas's creative inspiration, I would have to say Llareggub. But as an insight into his egotism, his smouldering moods and his general indifference to the feelings of others, it is wonderfully sad and revealing.

Thomas had a good war, boozing and writing while other men (including Killick) were being traumatised by the horrors of battle. In one scene near the end, Thomas's behaviour towards his friends seems unforgivably callous. But this is not, after all, Thomas's film. Murphy gives us a magnificent study in doomed passion and the emotional debilitation of war. Miller is charming and pathetic as the wife. And Knightley looks almost too exquisitely delicate to be real (as she did in Pride and Prejudice). But this is probably her finest performance. And in every respect the film is worthy of her.

Sentiment: positive