A Senate Agriculture subcommittee, after six weeks of slow-paced compromise, unanimously approved legislation yesterday to bail out the financially distressed farmer-owned Farm Credit System (FCS).

The bill provides for the sale by a private entity of $4 billion in 15-year government-backed bonds. Interest would be paid by taxpayers for the first five years, by taxpayers and the system in the second five years and by the system in the final five years.

Sen. David L. Boren (D-Okla.), chairman of the subcommittee on agricultural credit, predicted that the bill has a 75 percent chance of enactment.

Boren said the subcommittee was so badly split when deliberations began in mid-September that "we just didn't stand a chance" then of moving through Congress the bill that was approved by a 9-0 vote of the panel. The Agriculture Committee is scheduled to consider the bill Wednesday.

A newly created assistance board would oversee the dissemination of funds to banks within the farmer-owned system, which has lost $4.8 billion since 1985. The system's third-quarter financial report to be released next week is expected to show improvement in system finances, but lawmakers said individual banks in the system still need help.

The value of farmers' current stock in system banks would be guaranteed but in the future, banks would be required to raise capital by other means.

The legislation would help stabilize the economy shaken by the Oct. 19 stock market crash, senators said.

"If we're going to do anything about stabilizing this country, we'd better start with agriculture," Sen. John Melcher (D-Mont.) said.

The legislation also would provide for restructuring of FCS loans, new rights to financially troubled borrowers and state programs, financed in part with federal funds, to encourage farmer-borrower mediations.

To provide new competition for the FCS and a new source of long-term farm credit, the legislation would create a secondary market, under which banks and insurance companies would be permitted to pool and sell farm mortgages as securities. The lawmakers agreed to phase in the secondary market over three years to keep it from overwhelming the FCS.

Among the toughest measures to resolve were provisions for restructuring loans made by the Farmers Home Administration, the Agriculture Department's farm-lending agency.

In one of the final deals, senators agreed to guarantee that Farmers Home Administration clients facing acceleration, a first step toward foreclosure, could receive living and operating expenses of as much as $18,000 a year out of farm receipts taken over by the government in that point of the foreclosure process.

The bill passed by the House earlier this month would bail out the FCS with an initial appropriation of $2.5 billion and future appropriations financed by sale of government loans to the private sector.

"This has been probably the most exhausting, contentious mark-up in which I've ever been involved," said Sen. Rudy Boschwitz (Minn.), ranking Republican on the subcommittee.