Once you get past the slightly queasy feeling that comes from watching a Woody Allen movie about an artistic guy who lives happily with two adoring women—something you might be inclined to consider either wish-fulfillment or self-justification—you should find “Vicky Cristina Barcelona” an engaging addition to the writer-director’s ever-growing filmography, superior to many of his latter-day efforts.

And at least it isn’t set in an elite New York high-rise. The locale is instead sunny Spain, where American girlfriends Vicky (Rebecca Hall) and Cristina (Scarlett Johansson) are vacationing at the Barcelona home of family friends Judy and Doug Nash (Patricia Clarkson and Kevin Dunn). While eating out one day they’re approached by suave, handsome painter Juan Antonio (Javier Bardem), who invites them to fly with him to the small town of Oviedo, where he’ll serve as their host and tour guide.

Level-headed Vicky—who also happens to be engaged—demurs, but Cristina’s ready to take a chance, and the three are soon frolicking in the picturesque place, and though Vicky is tempted, it’s Cristina who willingly falls for Juan Antonio’s charms and into his arms. Eventually she moves in with the painter while Vicky goes back to Barcelona, where her amiably bland fiance Doug (Chris Messina) shows up with a proposal that they marry immediately.

But there’s a more problematic arrival back in Oviedo, where Juan Antonio’s volatile ex-wife Maria Elena (Penelope Cruz), who once attacked him with a knife, returns in desperate straits and he takes her in, creating an immediate menage a trois. But it’s a menage without rancor, because the two women hit it off beautifully after a rocky start, with Maria Elena mentoring Cristina on the finer points of photography on walking tours that feed on, among other things, the architecture of Gaudi. And the combination has a remarkably positive effect on all three, from the creative as well as the personal perspective. Of course there are further complications among them—and Vicky’s uncertainties about her future reenter the picture—but in the end the message seems to be that the artistic productivity is well worth all the trouble.

Whether or not you care for that conclusion, which can be used to justify the most outrageous conduct, Allen’s film is, quite apart from it, quite a charming one. To be sure, it has its flaws, or more precisely unfortunate storytelling shortcuts, the most obvious of them being the use of narration delivered by an omniscient fellow (actually actor Christopher Evan Welch) who fills us in on characters’ backgrounds and motivations, skips through connective passages and offers pointed observations about what’s happening. It’s not as bad as it sounds, but it does make the film sometimes seem like a New Yorker short story transferred to celluloid. But like most New Yorker stories, it’s quite a good one.

It’s also been astutely cast. Bardem is as attractive and inviting here as he was terrifying in “No Country for Old Men,” making it easy to understand why women would circle around him. And what a harem he has! With “Elegy” and this film, Cruz has reached top form; in this case, though, she’s temperamentally volcanic, changing effortlessly from harridan to gregariously supportive. Hall, meanwhile, wittily moves from self-assurance to neurotic uncertainty, and though Johansson is still no great shakes as an actress, Allen makes good use of her youthful allure and cagey self-regard. The ever-reliable Clarkson makes a knowing observer, while Dunn and Messina are convincing as the less perceptive males in the ensemble.

Cinematographer Javier Aguirresarobe revels in the atmospheric locations as much as Allen does, and the soundtrack uses Iberian music as effectively as his older Manhattan stories employed jazz riffs and pop American tunes.

There’s an autumnal romanticism to “Vicky Cristina Barcelona” that makes it different from anything Allen has done before, giving it a wistful feeling beneath its genially cynical exterior. It lacks the crackling wit of some of his films and the dark psychological undercurrents of others, but the picture has a Mediterranean glow that gives the tale of passion and creativity a fundamentally warm quality that will surprise many viewers.