* Almost 30 years ago, Polish security police hammered on the closed main door of the archbishop's palace on Miodowa Street here to take the nation's Roman Catholic primate into exile. They roused Stefan Wyzinski from his bed and handed him a government order stripping him of his office and duties and banishing him from Warsaw.
* This past weekend, the officially controlled Polish press gave front-page display to the exchanges between Poland's communist leader, Gen. Wojciech Jaruzelski, and his countryman from the Vatican, Pope John Paul II.
The Pontiff's presence here this week, on a second pilgrimage to his homeland since going to the Holy See in 1978, marks an extraordinary change from the 1950 s.
Great strains still are visible in the church-state relationship. The Pope has spoken out sharply against current hardship, suffering, and lack of freedoms. The on-again, off-again meeting between the visiting church leader and the head of the banned Solidarity union, Lech Walesa, is another sign of current church-state stresses.
But back in Stalin's time the papal visit and its attendant publicity simply could not have happened at all. It could not have occurred even after the Soviet dictator's death during the continuing ''Stalinist'' period, which persisted in Poland until 1956, the year Wyzinski was released from his captivity.
What started then, however, was a new modus vivendi between state and Roman Catholic Church without precedent or parallel within the communist world. It was remarkable even in Poland itself - despite the immense historical authority of its church and the allegiance to it of the vast majority of Poles.
Poland has more than 30 religious denominations. Before World War II, the only significant ones were the Catholic Church, claiming some 68 percent of the nation, and the 3.5 million Polish Jews, almost all of whom were to perish in Nazi concentration camps. Hitler's ''final solution,'' and the fact that Protestant and other faiths counted (and still count) no more than 750,000 members, meant that the Catholic Church gained an even more commanding position with up to 85 percent of the postwar population.
Its hold on the minds of the nation can be gauged from the fact that most Communist Party officials and rank-and-file members themselves observe Catholic family tradition. Many have their children baptized. Their children often opt - like those of the great noncommunist majority - for a church marriage to follow the civil ceremony, which is obligatory and the only form recognized by law.
For the first three years after the war the church was not greatly interfered with. Churches everywhere were filled, and among the congregations were many soldiers from the resistance forces that fought the Germans and were now in the new Polish Army.
But in 1948 the Communist government turned on the church. The party, clearly feeling challenged and threatened by a rival influence and an obstacle to its tightening grip on power, accused church leaders of nursing political aims. Bishops and clergy were harassed. About 100 or more ordinary parish priests were jailed on trumped-up charges. Many more banned from their parishes and church duties.
Religious teaching in schools was forbidden and confined to lessons in the churches. The authorities sought to gain a hold on the priests by paying their salaries; but the church rejected the proposal in order to preserve its independence. Permits to rebuild or restore the hundreds of churches destroyed or damaged in the war were refused.
In 1955, the pressures began to lift amid a general welling up of popular resentment against the regime which erupted, finally, in the strikes starting in Poznan in mid-1956. It was the bloody suppression of these worker protests which sparked a new wave of unrest and brought in Wladislaw Gomulka as party chief and initiator of the ''Polish October'' reform program.
It was Gomulka who ordered the primate's release and restoration to his office. He also freed other priests, reinstating them in their parishes, and opened the door to better relations between the party leadership and the church.
But the rapprochement proved a short-lived process. It broke down altogether in the 1960s as Gomulka, too, fell out with the nation generally. Under Gomulka's successor, Edward Gierek, there was a return to the modus vivendi which has somehow survived Poland's present crisis and is seen by both sides as almost certainly the only way to overcome it.
It is without parallel in the East bloc, with the exception of Hungary. There , too, the strongest of the churches is the Catholic, claiming some 65 percent of Christian believers. A Hungarian-Vatican agreement in the '60s led to an all-around promotion of contacts between Budapest and the Holy See.
It was, in fact, a first breakthrough for a new Vatican ''Eastern policy'' aimed at easing and improving the situation of the church in Eastern Europe generally. In his speeches here, Pope John Paul II has made it clear he is bent on carrying this on despite, for example, the serious further deterioration of the church's position in Czechoslovakia.
Among the communist states, Czechoslovakia has most vehemently criticized the Pope's trip to Poland. Officials here admit that most Warsaw Pact allies have had reservations about the visit. But none has evinced the open disapproval expressed by the Prague regime, which at home has cracked down on Catholic priests identifying with the Charter 77 human rights movement, jailing some of them.