The Sandinista government of Nicaragua yesterday signed an agreement to compensate an American gold and silver mining company it nationalized when it took power in 1979, calling the negotiated settlement "a model for the relations between our two countries."

The signing ceremony with Rosario Mining Co. seemed as much a political statement by the Nicaraguans as the settlement of an economic dispute, apparently aimed at American public opinion and delegates to the International Monetary Fund and the World Bank now meeting here. It also served to distance Nicaragua from Cuba, which has never compensated Americans for corporations that were nationalized after the Castro government took over in 1960.

Carlos Arguello, Nicaraguan vice minister of justice, said the agreement with Rosario should "prove with tangible facts the willingness of my government to negotiate honorably in all controversial matters."

"The agreement, and the process that produced it," he continued later, "demonstrates the Nicaraguan government's attitude toward the U.S. and the business community in particular, and its interest in promoting just, positive and mutually beneficial relationships based on mutual respect."

The Nicaraguan government agreed to pay Rosario $4.5 million plus interest, totaling $8.8 million, over the next six years for the gold and silver inventory at the mine when it was nationalized in November 1979. The company's claim for the value of the property will be submitted to international binding arbitration.

The Rosario agreement is the second settlement made by Nicaragua over the past year with nationalized American mining companies. Last December, it signed a similar agreement with Neptune Mining Co., which has received $1 million in partial payments already.

Arguello said these are the two major foreign properties nationalized, though there are a few smaller mines whose owners have not yet submitted claims. He said domestic claims arising from nationalization are being treated the same way.

The agreement was signed by Finance Minister Joaquin Cuadra and Justice Minister Ernesto Castillo for Nicaragua and Colin Brooks, president of Rosario, who called the settlement "a testament to good faith on both sides."