Last year, Montgomery County took what some insurance experts call a gamble: the county became its own insurance company.

Faced with rising insurance premium costs and an increasing scarcity of certain types of insurance coverage, county officials decided they could save millions of dollars by setting up their own insurance fund and hiring their own personnel to run it.

In so doing, Montgomery County joined Arlington and Prince George's and an undetermined number of other local governments around the country who have also gone into insurance business for themselves.

By the end of this fiscal year, Montgomery officials say they will have saved $3.3 million in premium costs. Arlington officials - who have more restricted coverage - say they have saved $350,000 in two years of operations.

Prince George's County officials, who went to a self-insurance plan 10 years ago, estimate their savings in the millions of dollars, but could not be more specific.

But, while the savings of such a program are considerable, these local jurisdictions are also taking a gamble which, one insurance expert says, some of them could not afford to lose.

Self-insurance "makes some sense if your government is bigger and better run than average," said Jim Rafferty, a specialist in the commercial casualty section of the Hartford Insurance Group, which used to handle Montgomery Countyhs insurance needs.

But most governments, Rafferty added, would be unable to provide the expertise needed in such a complicated field and might not "accumulate sufficient funds quickly enough to absorb a catastrophic loss."

The increased push for self-insurance comes at a time when local governments are being sued more frequently and for larger and larger amounts. At the same time, budget-cutting sentiments among taxpayers are forcing officials to find new ways to save money.

This combination of factors is making the risk of jumping into the complicated, high-stakes field more attractive.

The key element in becoming self-insured is setting up a reserve fund to pay for injury to people or damage to property caused by the government or its agents or employes.

For instance, if a county-owned car is in an accident, the county may be liable for damage caused to another vehicle or for another driver's medical expenses. If a police officer shoots and paralyzes an innocent bystander, the county would be liable for the individual's medical bills and for other damages a judge or jury might award.

In just such a case, the county recently agreed to pay $1.28 million to a cab driver paralyzed by a Montgomery County policeman's bullet. The county, however, was still insured by the Hartford group at the time of the shooting, and so does not have to dip into its newly established $5.6 million reserve to pay the claim.

Montgomery County Finance Director Albert Gault however, discounts claims that the county is taking an increased risk by insuring itself.

"This isn't a gamble," Gault says. "We have more coverage now than we had with commercial insurance."

For years, Montgomery County had trouble buying insurance. Although the number of claims shot up by about 40 percent in three years and the total value of those claims paid out almost doubled in two years from $736,000 in 1976 to $1.38 million in 1978, fewer companies were bidding for the county's business. And they were asking for more money.

In three years, the cost of permiums almost tripled as a percentage of the budget: in six years, the county's premiums shot up from about $500,000 in 1972 to about $2.4 million in 1978.

But the amount of money the insurance companies actually paid out in claims against the county was always way below the premiums: $1.39 million for 1,334 claims in 1978. In that year alone, the county paid more than a million dollars more than the insurance company paid back.

Worse, no company would sell the county professional liability insurance, which would protect elected officials and public employees if they got sued for malpractice.

According to the insurance industry, the rise in prices and the restriction in coverage is due to inflation, the elimination of sovereign immunity - governments now may be sued - and a general increase in litigation.

As one insurance agent explains, "It's fear that keeps the prices up. Fear of the $10 million cas award. If just one school bus turns over, seriously injuring all 30 or so children - that's it."

The cost of premiums finally prompted Montgomery to start up its own fund. And as they went into the insurance business for themselves, county officials also decided to bring the county public schools, Montgomery College, and the Maryland National Capital Park and Planning Commission under the same insurance umbrella.

The total cost of the reserve, $5.6 million, was equivalent to one year's premiums for all those groups.

At the end of the first year, Montgomery had spent $2.9 million in insurance expenses: $1.8 million on claims and much of the remainder to cover administrative expenses, such as the cost of investigating claims.

The threat of a large claims does not worry Finance Director Gault. "We go on what's probable," he said. "We haven't had a major catastrophe in 300 years of county history."

Last Friday, however, Gault hedged his bets a little. He spent $120,000 in county funds for premiums for so-called "excess" insurance - private insurance which will pay claims that exceed the amount of the county's reserve fund.