National Public Radio last night signed an agreement for an $8.5 million loan designed to save the network from bankruptcy and pay off its multimillion dollar deficit.

The agreement was signed after some last-minute haggling among lawyers for NPR, the Corporation for Public Broadcasting, which is making the loan, and a three-member trustee group selected to hold the title to NPR's satellite equipment.

Yesterday was the deadline set by CPB for completing the agreement.

For the last two days the lawyers, according to a source close to the negotiations, have battled over the question of indemnification--would the individual trustees be liable for any lawsuits, for example. Or would they be liable for any business expenses NPR incurred but didn't pay? The trustees, who will be formally announced today, are attorney Elliot Richardson, attorney Henry Geller and former CPB board member Virginia Duncan.

The negotiations have been marked by a series of fits and starts. Lawyers met until 3 a.m. yesterday, and it took the personal intervention of Sharon Percy Rockefeller, CPB board chairman, to get things moving. A full explanation of the agreement is expected at a press conference today.

Ronald Bornstein, NPR's interim chief operating officer, said before the signing that he didn't know the details of the last-minute snags.

By yesterday evening, the second day of its national on-air fundraiser, NPR had received pledges of $1.2 million. Most of the 100 participating stations will keep a large chunk of that money as reimbursement for earlier pledges they had made to the network. NPR's share of the new funds, she said, would be "more than $250,000, because WBEZ, Chicago, and WETA are giving us all the money they raise."

WETA reported it had received 1,756 pledges, totaling $74,060, as of 6 p.m yesterday. The "Friends of NPR," an independent group of prominent listeners, announced yesterday that it had raised $107,000 from two newspaper ads it bought in June.