Pope John Paul II, in a thinly veiled appeal for moderation and restraint in the increasingly restive Moslem world, today urged followers of Islam, Judaism and Christianity to join in pursuit of "rectitude for moral conduct."

Throughout the first two days of his first visit to this Moslem country, the pope appeared anxious to be seen as talking directly to Moslems, although his schedule is dominated by ecumenical discussions in his attempt to advance the reunification of Roman Catholicism and Eastern Orthodoxy.

In spite of the Turkish government's attempt to minimize the religious nature of the visit and present the pontiff as a visiting head of state in a secular nation, the pope repeatedly underscored the theme of universal worship of one god by believers of the three great monotheistic religions.

While not referring directly to Islamic-inspired turmoil in Iran and the hostages being held in the U.S. Embassy in Tehran, the pope seemed to be signaling his concern over the turn that religious fundamentalism has taken in some Moslem countries.

In a speech to the tiny Christian community in Ankara, shortly before traveling here for the second leg of his three-day visit to Turkey, the pontiff declared:

"I want to take advantage of this meeting . . . to invite you to consider every day the deep roots of the faith in God, professed by the spiritual descendants of Abraham -- christians, Moslems and Jews - [that] when it is lived sincerely, when it penetrates life itself, is an assured foundation of the dignity, the fraternity and the liberty of men and a principle of rectitude for moral conduct and life in society."

That the pope chose the capital of a nation of 45 million Moslems to make the statement was widely interpreted here by Turkish observers and some members of the papal entourage as an oblique sermon to the followers of Iran's revolutionary leader, Ayatollah Ruhollah Khomeini, and religious extremists elsewhere in the Islamic World.

As it has been the past two days security surrounding the pope today was almost suffocating. And in contrast to previous trips in the West he was almost unseen by the Turkish public.

There have been assassination threats by rightist terrorists and Armenian nationalists and in Ankara last night security forces rounded up more than 600 persons who attempted to organize demonstrations against the visit.

In another seeming reference to turmoil in the Middle East the pope asked his Christian audience, "I wonder if it is not urgent today when Christians and Moslems have entered a new period of history to recognize and develop the spiritual links which unite with the goal to spread and defend together as we were invited to do by the Vatican Council moral values, peace and liberty?"

The pope also appeared intent on relieving the not insignificant anxiety among many Moslems that the Roman Catholic Church's current emphasis on drawing itself closer to the Eastern Orthodox churches is a sort of modern-era Christian crusade with political undercurrents originating in the West.

At the end of his visit Friday the pope is expected to announce the formation of a 28-member joint theological commission to deal with such barriers to reunification as papal primacy and different attitudes toward divorce which have separated the two churches since the 11th century.

In a message today to the patriarch of the Armenian Orthodox church, Snork Kalustyan, the pope said, "As long as we are divided among ourselves, we are not fulfilling this essential element [of communion] of our calling."

When he landed at the international airport here today after a 40-minute flight from Ankara, the pope found another deserted terminal except for journalists and representatives of the Christian community who were permitted to greet him. The plane was immediately surrounded by plainclothesmen carrying submachine guns, and the motorcade route to this historic crossroads of Europe, the Middle East and Asia minor was heavily patrolled by army troops.

After meeting with the ecumenical patriarch of Constantinople, Dimitrius I, the pope visited the famous Topkapi museum, former palace of the Ottoman sultans, and St. Sophia's basilica, which was built by the Emperor Justin in the 6th century and which is where the great schism took place in the 11th century between Rome and Byzantium.

It was in St. Sophia's that Pope Paul VI fell to his knees and prayed during his 1967 visit here, an incident which antagonized many Turks because of its implications.Turkey secularized the church in 1935 and made it a museum.

The church today was surrounded by heavily armed troops, and the surrounding streets were sealed off by armored personnel carriers.

The pope, followed by a noisy trail of cameramen, walked through the magnificently adorned church, admiring the mosaics and occasionally asking questions of his Orthodox hosts.

Friday, the pope will travel to Ephesus, the ancient greek city near Izmir, and then return to Rome in the early afternoon.