The traditional message of Christmas rang out from the pulpits around the world last night, but it brought little joy to American hostages in Iran and small comfort to Poles whose good cheer was rationed.

Chinese Christians had something special to celebrate however: the reopening of the second Catholic church in Peking.

In a homily prepared for midnight mass in St. Peter's Basilica, Pope John Paul II said: "On this night I wish to be particularly close to you, to all of you who are suffering -- and to you who have been struck by the earthquake, and to you who live in fear of wars or violence, and to you who are deprived of the joy of this midnight mass of the birth of the Lord, and to you who are nailed to a bed of pain, and to you who have fallen into despair, into doubt about the meaning of everything."

An estimated 300,000 people were left homeless by the earthquake Nov. 23 which killed almost 3,000 people and cast a pall over the Christmas holiday for many Italians.

"The light of the night of Bethlehem has reached many hearts, and yet, at the same time, darkness remains," the 60-year-old Polish pontiff said. y

"At times this darkness even seems toget deeper," John Paul told a capacity congregation in the Christian world's biggest church. A television audience estimated to include a billion people worldwide also saw the pope celebrate the Christmas service, clad from miter to shoes in the traditional gold and white vestments of watered silk.

Thousands of pilgrims, tourists and dignitaries broke into applause when the pope entered the church in a procession, with the Sistine Chapel choir chanting in the background.

Earlier yesterday, the pope received a 1,000-strong delegation of his fellow Poles, who presented him with a Christmas tree specially grown in Poland. The pope broke oplatek , Polish Christmas bread, with his countrymen at the hour-long audience in the Vatican.

In Poland, widespread food shortages, with meat and butter rationed in many places, ensured an austere Yuletide.

For the first time in three decades, however, Midnight Mass was being broadcast by state radio. Poland's Catholic press also published an appeal by the pope for respect for his homeland's sovereign rights.

In a message clearly reflecting concern that the workers' challenge to Communist authority might lead to some kind of Soviet intervention, the Pope said: "A right conviction prevails in the world that the balance of power and security on the European continent is linked with respect for Poland's sovereign rights."

In neighboring East Germany, fewer people from West Germany were expected to spend Christmas with relatives there.

Border authorities at Helmstedt in the West said the number of people crossing to the East was almost 70 percent less than in 1979.

Authorities said the main cause was a drastic increase in compulsory currency requirements imposed by the East German government last October.

As Christmas Day began in Peking, about 1,000 people attended Midnight Mass in the reconsecrated Church of St. Joseph, which was closed at the start of Mao Tse-tung's now-denigrated Cultural Revolution.

Until earlier this year, the church, which was founded in 1666 by French missionaries, had been used as a government clothing warehouse. But in line with China's more relaxed policy toward religion, the country's independent Catholic Church took back the building and reopened it yesterday. iThe first service last night was conducted by Bishop Michael Fu Tieshan of the Peking diocese.

All day in advance of the service, workmen erected new crosses -- an unfamiliar sight on the Peking skyline -- and cleaned columns and stained glass windows. A nativity scene was set up near the flower-bedecked altar. However, a huge red star -- the symbol of communism rather than the Christ child -- dominated the entrance to the church.

"Christmas is a festival of unity for mankind," Bishop Fu said before the consecration of the church.

All churches in China were closed at the start of the Cultural Revolution in 1966. The Catholic Church, which broke with the Vatican when the communists took power in China in 1949, reopened its first church a year ago. The Protestant movement also reopened two churches.