Pope John Paul II stepped off a raised, fenced-off platform and plunged into a jammed prison yard today in an unscheduled display of compassion as a convict chorus sang Beethoven's ``Ode to Joy.'' The pontiff then told about a thousand prisoners that ``the worst prison is a closed heart,'' and urged them to keep up their hope for a better life because ``Christ never loses hope in his creatures.'' The pope had been scheduled to greet only one prisoner _ a man who had killed his wife _ before his brief speech, but John Paul conferred with several assistants when he reached a platform that had been set up in the prison yard. The prisoners were confined behind a high Cyclone fence, but the pope descended from the platform, ordered that a gate be opened, and strolled into the yard, greeting and blessing prisoners for 20 minutes. One prisoner showed off an injured foot, and others appeared to be shaking with nervousness or joy as the pope approached. A prison band played Mexican tunes, then broke into the ``Ode to Joy'' in Spanish as the pope toured the yard. The ``Ode'' is the choral finale to Beethoven's Ninth Symphony. The state prison in Durango holds about 1,200 prisoners, authorities said, including convicted murderers and drug traffickers. The pontiff was scheduled to address a crowd of businessmen on their social responsibility during the afternoon. On Tuesday night, in a speech to diplomats in Mexico City, 450 miles to the southeast, the pope called for a moral as well as an economic approach to the ``imprisoning'' foreign debt crisis. ``Technical measures are not enough to resolve the great problems that menace international equilibrium,'' the pope told the diplomats. ``I feel the obligation to underline ... the ethical dimension of this imprisoning crisis,'' which, the pontiff said, was hindering development in many poor nations of the world. John Paul met the diplomats after celebrating a Mass for young people near a shrine at San Juan de los Lagos, 250 miles northwest of Mexico City. There, he encouraged Mexico's young people not to be disheartened by injustice and inequality and to use Christ as a defense against despair. He said loss of hope in today's world was symbolized by ``evasion, abandon, hedonism, discotheques, drugs, indifference, pessimism, the artificial paradises in which so many find refuge.'' ``Young people, don't lose hope! You are the pilgrims of hope,'' the pontiff cried. More than 200,000 people packed the slopes of a hill outside San Juan for the Mass on Tuesday. Many waved flags in papal white and yellow or in green, the town's colors, and interrupted the pope frequently with cheers and chants. Priests wore white robes and yellow baseball caps to ward off the harsh sun. The town was one of the centers of a guerrilla war waged in the 1920s by Catholic conservatives opposed to the government's tight religious restrictions, and memories of the conflict are still strong. A large banner on a building facing the altar read ``Viva Cristo Rey'' _ Long Live Christ the King _ the battle cry of the Cristero rebels. In a morning address to teachers, the pope issued a veiled call for a lifting of constitutional prohibitions on religious schools, a prohibition that is ignored by many schools and even universities. ``Open the world of teaching to Christ!'' the pope said in a speech at the airport in Aguascalientes, about 50 miles north of San Juan de Los Lagos. Church-state relations are now at their best in 50 years, and President Carlos Salinas de Gortari recently sent a personal representative to the pope. The move was seen as a step toward possible re-establishment of the diplomatic ties severed in 1926. ``I have observed with great satisfaction the significant and important gesture of the president,'' the pope told the diplomats on Tuesday evening. John Paul's eight-day trip is his 47th outside Italy since becoming pope. He first visited Mexico in 1979.