GREENWICH, CONN., AUG. 2 -- Allianz AG, Europe's largest insurance company, announced an agreement today to purchase Fireman's Fund Insurance Co. for $3.3 billion in cash.

The move will give Allianz an anchor in the U.S. insurance market, analysts said.

"It's a quantum leap in terms of their presence here," said James Ramenda, an insurance analyst with Northington Partners in Avon, Conn.

Fireman's Fund, a nationwide property and casualty company, is the principal subsidiary of Greenwich-based Fund American Companies, and had gross premiums in 1989 of $3.2 billion.

Allianz, based in Munich, had a worldwide premium value of $20 billion in 1989, and has 223 subsidiaries in 45 countries. Allianz already operates in 20 states, company officials said.

Analysts agreed that the purchase will help Allianz prepare for Europe's economic changes scheduled for 1992, when the European Community countries will break down trade barriers.

With 1992 and its promise of increased competition looming, "diversification makes a lot of sense," Ramenda said.

The U.S. insurance market makes up more than half the world market, said Bob Branche, managing director of Branche Research Group in Bucks County, Pa.

"You can't operate in Europe and just plain Europe, period," Branche said, adding that other European companies are likely to follow Allianz's lead.

The $3.3 billion price tag, which is almost three times Fireman's Fund's book value, is what Allianz had to pay for a larger share of the U.S. market, Ramenda said.

Foreign buyers need to find "friendly deals" in the U.S. market because hostile deals can be blocked easily at the state regulatory level, he said.

Under the agreement, Allianz will acquire 100 percent of Fireman's Fund Insurance stock. Fund American will buy back Fireman's Fund's common stock portfolio and other long-term investments for $2.2 billion in cash.

When the transaction is closed, Fund American will repurchase all 300,000 shares of convertible preferred stock of Fund American now owned by IFINT SA, a Luxembourg corporation, for $434 million in cash plus unpaid dividends.

Fund American also plans to offer shareholders $800 million in assets, either through dividends or a tender offer, the company said.

Fireman's Fund, headquartered in Novato, Calif., was founded in 1863. In 1968, it was acquired by American Express Co., and in 1985 became an independent company during what was then the largest initial public offering in the history of the New York Stock Exchange.

The company's revenue increased to $4.3 billion in 1987 from $3.3 billion in 1985, but slipped to $3.29 billion last year. Net income also peaked at $404 million in 1987; last year's profit fell to $116 million from $279 million in 1988.

Joyce Culbert, an insurance analyst with S.G. Warburg and Co. in New York, said she couldn't understand Fireman's Fund's appeal to Allianz, since the U.S. company has been fighting rising claims costs and flat premium prices.

"The question is, what do you do to make it better, and do the Germans know something that {Fireman's Fund Chairman} Jack Byrne doesn't know?" Culbert said.

The transaction, subject to approval by insurance and other regulatory authorities and Fund American stockholders, is expected to be completed early next year.