Roberto Rossellini, 71, whose impassioned "Open City," a semidocumentary melodrama made after the Allied liberation of Rome, established Italian neorealism as the most exciting film-making movement of the postwar period, and whose love affair with actress Ingred Bergman became the most notorious and controversial story of its time, died yesterday.

Rossellini collapsed after an apparent heart attack as he was preparing to leave his apartment in Rome to deliver an article he had written for a newspaper. Members of the director's family said that he had asked that a doctor and some friends be called, but that he died before they arrived. His first wife, former actress Marcella de Marchis, and their son, Renzo, a motion picture producer, were with Rossellini at the time of his death.

Ingrid Bergman, contacted at the Chichester Festival Theater in England, said through a theater official that she would have no comment on her former husband's death. Married in a Mexican proxy ceremony in 1950, Bergman and Rossellini collaborated on five films, including "Stromboli," the once-notorious but now almost forgotten production that began their affair in 1949. They had three children, a son, Roberto Jr. and twin daughters, Isabella and Isotta.

Rossellini and Bergman separated in 1957, and their marriage was annulled in 1958, a court decision that prompted a Vatican official to comment, "We reach this enormity - two persons first go through all legal strategy and tactics to justify their concubinage, and when the experience is over, they themselves admit that the so-called marriage was null and void."

At the time of the separation, Rossellini was being linked romantically with Sonali Das Gupta, a young Indian screenwriter who had left her director husband while working with Rossellini on a documentary about India. They were married in 1959, but seprated a few years ago.

Born in Rome on May 8, 1906, Rossellini was the eldest child of a prominent architect who had built two movie theaters in Rome, the Corso and Barberini, and had many friends and business associates in the Italian film industry. When his father's death led to a rapid decline in the family's income, Rossellini decided to follow the example of his younger brother, Renzo, who was working as a film composer and would later score many of his older brother's pictures, and seek a living in the movie business.

Beginning as a dubber, editor and more or less anonymous scriptwriter. Rossellini raised enough money to direct the first of several short amateur films in 1936. According to film historian Pierre Leprohon, Rossellini's work was crucially influenced by Francesco De Robertis a dramatist who had been recruited by the Fascist government to head the film service of the Italian Navy in the late 1930s.

Rossellini served as De Robertis' assistant on a film about submariners, "Uomini sul Fondo," and then directed a feature of his own, "LaNave Bianca" ("The Hospital Ship"), in the semidocumentary style, emphasizing authentic locations and nonprofessional actors as favored by De Robertis.

Rossellini directed two other features for the Italian government's propaganda service and collaborated on a third before the pressure of the German occupation of Italy and the Allied advance changed the direction of his career.

Seeking to avoid conscription by the occupation authorities Rossellini hid in an apartment shared by screenwriter Sergio Amidei and a Communist member of the Resistance. The scenario of "Open City," eventually constructed by Rossellini, Amidei and a young ex-journalist named Federico Fellini, took shape during this period of hiding and constant exposure to the activities of the Roman underground.

In 1956, Rosellini recalled, "We began our film only two months after the liberation of Rome, despite the shortage of film stock. We shot it in the same settings in which the events were created had taken place. In order to pay my film I sold my bed, then a chest of drawers and a mirrored wardrobe. 'Open City' was shot silent, not by choice, but by necessity. Film stock cost 60 liras a meter on the black market . . . Also, the Allied authorities had only given us a permit to produce a documentary film."

According to Rossellini, the film was greeted coldly at private screenings and at a minor festival in September, 1945. But it created a sensation when released to the general public in Rome soon afterward. Critical and financial success followed in Paris and New York. An American GI named Rod Geiger had acquired the American rights for $25,000, and formed a company called Foreign Films Productions. Returning to Italy the next year, Geiger helped Rossellini produce the acclaimed successor to "Open City" - the six-part "Paisan," an epic tracing the interaction between American soldiers and Italians from the landings in Sicily to the end of the war.

Describing the impact of "Open City," Leprohon wrote in his book, "The Italian Cinema," that "this uncompromisingly direct film is a cry of revolt and suffering. And it is because the cry was heard that "Open City" was hailed as an event . . . Neorealism had been prefigured in (Alessandro) Blasetti, and brought into existence by (Luchino Visconti). But it was Rossellini who thrust it into the limelight . . .

". . . Rossellini provided neorealism with a method and style. The difficulties surrounding its emergence . . . did not of course create the inspiration, but they forced the director to find solutions, and in doing so to draw on his inventions and his genius . . . Because Rossellini had no studio sets, no lights, no sound trucks, the Italians were to go on shooting in the streets, rejecting fine lighting effects and pretty photography, and shooting without sound, which was postsynchronized.This necessity was to be the surest way for them to free themselves of bourgeois settings, white telephones and period trimmings. Poverty was to be their luxury and their grandeur."

The neorealist impetus that had inspired such postwar classics as Rossellini's "Open City" and "Paisan," Visconti's "La Terra Trema" and Vittorio De Sica's "Shoeshine" and "The Bicycle Thief," did not survive past the early '50s. Rossellini's career was never quite the same after the "Stromboli" scandal of 1949-50, which gave him an international reputation of a rather unsavory kind.

Ingrid Bergman's admiration for "Open City" and "Paisan" had prompted her to write a letter to Rossellini, volunteering her services for any movie he might like to make. They met in Hollywood in 1948 at the home of Bergman and her first husband, Dr. Peter Lindstrom. An American company, RKO, agreed to finance the project.Rossellini's artistic reputation was such that RKO agreed to let him shoot "Stromboli" without a completed script or production schedule.

In the permissive '70s, the furor created by news of the Bergman-Rossellini affair in 1949 may seem almost quaint, but one should remember that the actress was at the peak of her popularity, that her public image was exceedingly wholesome, and that her marriage to Lindstrom had also been represented to the public as virtually perfect.

The shock waves emanated most strongly from religious, civic and women's groups, but censorious remarks about the affair also reverberated from the floor of the U.S. Senate, where Edwin C. Johnson (D-Colo.) took persistent aim at Rossellini, whom he characterized at various times as "an infamous Nazi collaborator," "a notorious cocaine addict" and "a ruthless, blood-sucking, black-market operator of the greediest variety."

Bergman's pregnancy and the resulting scandal kept her away from Hollywood for eight years. The films she and Rossellini made together - "Stromboli," "Europa '51," "Voyage in Italy," "Joan of Arc at the Stake" and "Fear" - enjoyed limited critical and commercial success in Europe but were obscure failures in the American art-house market.

One of the ironies of the "Stromboli" affair sprung from Rossellini's alienation of his mistress, the late actress Anna Magnani, who had gained international fame in "Open City." Magnani took out some of her anger at Rossellini by signing to star in "Vulcano," a rival production set on a volcano is-Trade wits immediately dubbed this situation "The War of the Volcanos."

Rossellini international filmmaking esteem briefly in 1959, which "General Della Rovere," which starred Vittorio De Sica and returned to wartime setting. In the mid-1960s Rossellini abandoned theatrical features for a series of historical documentaries done for European television. One of these, "The Rise of Louis XIV," was acquired for American theater and played a successful engagement at the Outer Circle here in 1971.

Rossellini was the fifth major Italian director to die in the past three years, following De Sica, Visconti, Pietro Germi and Pier Paolo Pasolini.