STOCKHOLM, Sweden (AP) _ Ingmar Bergman is writing the script of his life story _ or at least part of it _ for a film to be directed by Liv Ullmann, who has appeared in many Bergman movies.

Bergman, known for such films as ``Scenes From a Marriage'' and ``The Seventh Seal,'' will write the screenplay for ``The Faithless,'' which deals with a woman and her passionate love life involving two men.

Bergman, 79, says he was one of those men. ``I've kept this story to myself for so many years, but it's not until now that I've been able to write it.''

Norwegian actress-director Ullmann had a five-year relationship with Bergman, who said he wanted to star in the role of the director, but was not allowed to.

``He isn't good enough an actor,'' Ullmann joked.

Filming is scheduled to begin in August 1999.