CAMBRIDGE, Mass. (AP) _ Costa Rican President and Nobel laureate Oscar Arias urged more than 5,550 graduates at a rainy Harvard University commencement ceremony Thursday to use their education ''to contribute to ease suffering in the world.''

Arias, who received an honorary degree during the school's 337th commencement, also pledged to continue to seek peaceful solutions to turmoil in Central America.

''What I am looking for is that the five nations of Central America will be able to live out their destinies in freedom, justice, peace and harmony, internally and externally,'' Arias said in prepared remarks.

Arias received the 1987 Nobel Peace Prize for his plan to end regional conflict in Central America.

''The majority of young people in this world are neither here nor in other university graduations,'' Arias said. ''That majority, if they are lucky, got up early today to plow fields or to start up machines in factories. Young people like yourselves are dying in futile wars or barely subsisting with no hope.

''The privilege of knowledge bears a social responsibility. Upon graduation, every student has an obligation to society. Your actions of the future must make a difference, must contribute to ease suffering in the world.''

More than 25,000 graduates, alumni and guests attended the outdoor ceremonies. Harvard President Derek Bok conferred degrees en masse, school by school. Some doctorate recipients held children aloft and students popped champagne bottles. Business school graduates were booed roundly when they stood to receive their degrees.

In all, the school conferred 5,526 undergraduate and graduate degrees.

In presenting an honorary doctor of laws degree, Bok praised Arias for his ''clear voice of peace and reason for our new world.''

Other honorary degree recipients were: economist John Kenneth Galbraith, Christian Science Monitor Editor Katherine Woodruff Fanning, operatic soprano Jessye Norman, mathematician David Harold Blackwell, ancient Roman historian Sir Ronald Syme, astrnomer Vera Cooper Rubin and epidemiologist Sir Richard Doll.