Rupert Murdoch, the Australian press baron whose media holdings span three continents, announced yesterday that he had agreed to purchase 50 percent of the holding company that controls Twentieth Century Fox Film Corp.

The move finally gives Murdoch, who owns newspapers, magazines and television stations all over the world, the gateway into the movie business that he has publicly craved for over a year. Last year, Murdoch had launched an aggressive campaign to take over Warner Communications Inc. and its Warner Bros. movie studio, but failed when the company secured Chris Craft Industries as a "white knight" alternative.

In a statement, Fox owner Marvin Davis and Murdoch said that Murdoch's News Corp. Ltd. would purchase half of TCF Holdings for $162 million. News Corp. said that it would also advance $88 million to the company.

Of that $250 million, roughly $132 million -- which includes a recently announced $50 million capital infusion from Davis -- will be invested in Twentieth Century Fox. The rest will be used to help retire both TCF and shareholder debt -- which had dramatically increased in recent months.

Murdoch's 50 percent stake means that the privately held Fox now joins Gulf & Western Industries' Paramount Pictures, Coca-Cola's Columbia Pictures and MCA Corp's Universal Studios in the ranks of conglomerate-owned movie studios.

"Fox had too much debt and too few hits," said Alan Cole-Ford, a movie industry analyst for Paul Kagan Associates, pointing out that the company's debt level had doubled to over $414 million over the last year.

The company suffered $12.4 million in losses last year as expensive films Fox had expected would be major hits -- such as "Rhinestone" with Sylvester Stallone and Dolly Parton; "Two of a Kind," starring John Travolta and Olivia Newton John; and "Unfaithfully Yours" with Nastassia Kinski and Dudley Moore -- proved to be flops.

In the wake of the flops, Fox chairman Alan Hirschfield resigned last September and was replaced by Barry Diller, who had enjoyed success as chairman of Paramount Pictures. Analysts say that Diller may be the key to turning the troubled studio around.

Fox has been restructuring its finances. Earlier this month, the company announced it had received a cash infusion of $170 million -- including Davis' $50 million -- and expanded its revolving credit agreement with its bank group.

However, said Cole-Ford, Fox's "need for additional equity dollars was, you should pardon the expression, paramount."

According to a source very close to the transaction, Fox approached Murdoch for the investment about three weeks ago. By using the equity to help retire debt, said the source, "it gives us the opportunity to get to profitability quickly."

The source said that Fox was moving more heavily into motion picture production than distribution. "We're going to spend more in production this year -- $200 million -- than we did in the last three years."

These production investments also explain the need for new equity in the company -- although no reason was given as to why Murdoch's should have been picked as Fox's new investor.

Murdoch, who publishes the Times of London, the New York Post and dozens of other publications, also owns a television network in Australia and a satellite "superstation" distributing television programs to cable TV systems in Europe.

Fox was acquired four years ago by Denver oil man Marvin Davis with his then-partner Marc Rich for about $800 million and taken private. Davis bought out Rich, who left the country in October 1984 because of financial legal problems, for $116 million.

Completion of the transaction is expected in about 30 days, pending expiration of the waiting period required by current antitrust rules.