VATICAN CITY, JAN. 29 -- Pope John Paul II coldly lectured Nicaraguan President Daniel Ortega today on the need to extend democratic liberties to all Nicaraguans during the first meeting of the two men since the pontiff was heckled during a 1983 visit to Nicaragua.

The meeting, in the pope's private libarary, took place despite deep divisions between the Roman Catholic hierarchy here and the revolutionary Sandinista government that rules mostly Catholic Nicaragua.

"The pope expressed to President Ortega the hope and need for the achievement of peace in the {Central American} region," said Vatican spokesman Joaquin Navarro, after the 45-minute meeting. "He underlined the need that it be achieved through a loyal dialogue, with the respect of the rights and fundamental freedoms of all." Vatican officials said the pope intended this reference to include the U.S.-backed rebels fighting to overthrow the Sandinistas.

Although Ortega later portrayed the discussions as "constructive and frank," a Vatican official said the Nicaraguan president had been forced to "listen rather than talk." It was "all business," said a church spokesman. "The pope received him coldly in the meeting," said the official who asked that his name not be published.

Vatican observers who witnessed the pope's initial greeting to Ortega in his Vatican apartments said they could not remember when the pope had been more abrupt and reserved with a foreign dignitary.

While the pope normally meets his official visitors halfway down the red carpet that leads to his private library, today he waited only a third of the way down, according to visitors, making Ortega and the 10-member Nicaraguan delegation that included his black-veiled wife, Rosario Murillo, walk most of the way to meet him. The pope briefly shook the Nicaraguan leader's hand, then whirled brusquely, turning his back and walked into his study forcing Ortega to follow. The pope usually embraces his guests, grabs their arms and personally ushers them into his chambers.

"The atmosphere was decidedly cool," said a pool reporter, Victor Simpson of The Associated Press, who witnessed the encounter.

The pope met in a private audience with Ortega for only 30 minutes, shorter than the time he usually allots to national leaders. The two men met alone, speaking Spanish without interpreters. The pope then spent another 15 minutes with Ortega and his entourage exchanging gifts and blessing a basket of rosaries that Murillo presented to him.

The meeting over, the pope led Ortega to the door reiterating that the church was in favor of "peace for all Nicaraguans."

Ortega, who was to hold another meeting later with Vatican Secretary of State Cardinal Agostino Casaroli, replied: "Yes, I think we must make peace."

Vatican officials close to the pope confirmed in private later that the pontiff's repeated insistence on "all the Nicaraguans" meant that he was concerned about a peace agreement that included "even those outside the country," including the contras, as the rebels are called.

Both Vatican officials and Ortega later in a press conference underlined the importance of the mediation role played by Nicaraguan Cardinal Miguel Obando y Bravo and, by implication, the Catholic Church. Representatives of the Nicaraguan government and the contras ended a round of cease-fire talks in San Jose, Costa Rica, today.

The Vatican and Ortega refused to comment on whether the issue of three Catholic priests serving in the Sandinista government against Vatican wishes had been raised.

One of the three, Foreign Minister Miguel d'Escoto, a Maryknoll priest who accompanied Ortega to Rome, discreetly stayed away from the meeting at the Vatican. He appeared at the press conference, but did not answer questions.

Ortega said his whole conversation with the pope was about the peace negotiations in Costa Rica.

Ortega, who arrived yesterday from a visit to Spain, also met here with Italian officials to ask for economic aid and political support for peace negotiations. He met President Francesco Cossiga yesterday and Prime Minister Giovanni Gorio and Foreign Minister Giulio Andreotti today. He will visit Norway and Sweden this weekend.