Before Brazilian business magnate Francisco Matarazzo died at 76 here in April, leaving a fortune valued at well over $100 million, he foresaw that his heirs might fight one another for control of the dozens of companies that make up Matarazzo Industries, Inc.

Matarazzo, in his will, urged his five children "to try always to stay united and not be so weak as to succumb to petty differences" - and backed up his admonition by decreeing that any heir who contested the will in court would automatically "lose the right to any of the benefits or bequests contained herein."

But another clause of the same will, naming Matarazzo's youngest child, Maria Pia, 34, as the administrator of his estate, has led to the squabbling Matarazzo hoped to forestall.

In a court action that is the talk of the Brazilian business world, two of Maria Pia's brothers have challenged her right to run the Matarazzo empire.

At stake is the future of one of the largest and most diversified business groups in Latin America. With holdings in textiles, agriculture, metals, chemicals, cement, real estate, banks and supermarkets, Matarazzo Industries, begun some 90 years ago as dealers in hogs and lard, grossed more than $500 million in 1976.

Ermelino Matarazzo, 52, backed by his brother Eduardo, 45, argues that "due to her lack of experience and age," Maria Pia "does not have the competence to direct so large and powerful a group." To bolster his contention that "more than 20 years as a director of businesses" have given him "greater judicial fitness" for the post, Ermelino has obtained statements from prominent business leaders.

The brothers have also hired some top legal talent. In one of the briefs, the lawyers have cited an obscure 1891 law that prohibits women from assuming "any position of responsibility" in private or public organizations in Brazil.

Lawyers for Maria Pia, who prior to her father's death ran the family's textile and public relations operations, have attacked this as machismo.

"It is hard to conceive today," they argue, "how an executive who considers himself modern could think that because he is a man he should have precedence."

As things now stand, Maria Pia is running the Matarazzo enterprises. But the will of the elder Matarazzo, the conservative, deeply religious youngest son of the Italian immigrant who founded the family fortune, does not give her a free hand.

Although she was awarded outright 20 per cent of the shares in Coframa, the Matarazzo's principal holding compan, and control of the rest, Maria Pia must bring her brothers in as minority partners within 10 years. Upon her death, her choice of heirs will be limited to bearers of the Matarazzo surname who work in one of the family's companies.

The elder Matarazzo had long expressed the fear that outsiders might gain control. He ordered that power always be concentrated in the hands of "one person, as it was for my father and myself," so as to "assure the continuity of our family in the destiny of the companies comprising the Matarazzo group."

The selection of Maria Pia as sole administrator was viewed with surprise when it announced earlier this year. After she had a divorce and second marriage that the father disapproved, he had broken with his daughter and cut off financial support.

But when Maria Pia suffered a particularly difficult pregnancy, the patriarch relented and invited her back to the family mansion, which occupies a choice piece of real estate in this city of 8 million. In 1975, Maria Pia's third husband, Renato Salles dos Santos Cruz, was made a director of the Matarazzo group.

For their part, Ermelino and Eduardo Matarazzo say they are exempt from the penalties prescribed in their father's will because they are challenging not the document itself but the creation of Coframa. They argue the fusion of five other Matarazzo holding companies into Coframa was illegal, causing them to suffer losses of approximately $7 million.