GENEVA (AP) _ A test of church against state took on greater dimensions Monday as 44 illegal immigrants from Turkey and Zaire obtained sanctuary from a Protestant church in Geneva.

They followed 59 Chileans who were granted shelter last month in a Protestant church near Zurich in response to an appeal by a Bern physician, Peter Zuber, who asked that the immigrants be offered sanctuary. His appeal was addressed to all 8,000 Roman Catholic and Protestant pastors in the country.

The 103 people receiving sanctuary faced expulsion after their requests for political asylum were turned down by authorities who have come under growing public pressure to check a record inflow of immigrants.

The 36 Zairians and eight Turks, including 21 children, moved into two parish meeting halls at Geneva's Reformed Church Sunday night, the Rev. Rudolf Renfer said.

He said he was aware the churches were ''in an illegal situation by accepting people with an illegal status.''

''But in offering them protection we feel legitimized by our Christian faith,'' Renfer told The Associated Press. ''We found their cases serious enough to justify a re-examination of their demands by the authorities so they are allowed to stay on humanitarian grounds.'' He said the immigrants had been in Switzerland from two to five years.

The Rev. Klaus Fuerst of the Protestant parish in Zurich-Seebach housing the 59 Chileans said, ''Authorities are legally entitled to take action but I hope they will be intelligent enough not to proceed.''

A Catholic priest, the Rev. Cornelius Koch, was quoted earlier by newspapers as saying that if necessary he was prepared to use force to prevent the deportation of refugees.

Justice Minister Elisabeth Kopp has not said if police might try to evict the aliens from the churches, but nationalist parties made sharp gains in recent local elections, bringing more pressure on the government.

Earlier this month, 59 Zairians were escorted by 120 Swiss police on a special Swissair flight to Kinshasa, Zaire. The government said the Zairians used forged papers in seeking political asylum. Zaire officially protested the expulsions, maintaining the refugees were subject to ''inhuman treatment.''

The sanctuary movement was initiated by Zuber who heads the Asylum Committee Switzerland established by several church groups.

Zuber said in a telephone interview he has received 30 ''positive answers'' to the 8,000 letters he and three clergymen sent to all Swiss pastors.

He said the group also has available 300 places of ''private sanctuary,'' half of which already house illegal aliens.

A criminal suit was filed against Zuber for violating residence laws, but a verdict has been repeatedly put off. He said an ''understanding judge'' was hearing the case and Zuber hoped it would be carried to the Supreme Court for a ruling in principle on the issue.

More than 23,000 requests for asylum are pending in Switzerland, which has the highest percentage of foreigners of all European countries. The influx reached a monthly record in September with 1,073 applicants, mostly Third World nationals and many of whom had illegally crossed into the country, according to the government.