The soldiers came for Abdullah Buyuk, the imam of the Sultan Selim Mosque here, on Sept. 20, eight days after the military takeover.

They put him in a jeep and took him to the antiaircraft battalion camp outside the city, which is the religious capital of Turkey. His beard and hair were shaved off and he was blindfolded and interrogated. Thus began 42 days of captivity for the imam of Konya's biggest mosque.

Buyuk is now free. He is again preaching at the mosque where before the coup, he says, as many as 25,000 people would come to listen to his Friday sermons in which he "evaluated current affairs from the point of view of Islam." But he will soon appear before a military tribunal to answer charges of working for the formation of an Islamic state in Turkey and inciting his congregation to rise up against the established order.

"They may hang me or put me before a firing squad or I may be reduced to working as a porter," said the 32-year-old, thin, bespectacled imam. "But I will not divert from Islam and the prophet whom I love."

Although 95 percent of Turkey's 45 million population is Moslem, Turkey is a secular state. Kemal Ataturk, the founder of modern Turkey who is deeply revered by the Army, drew sharp lines dividing religion and the state. But imams are financed by the government in order to help keep control of them. Propagating the formation of an Islamic state is a crime as are the wearing of the turban or slogans in Arabic script.

Buyuk is the follower of a powerful miniority movement striving to set up an Islamic state in Turkey, which the country's new military rulers are determined to crush, along with other extremist movements.

The movement, encouraged by the Islamic revolution in neighboring Iran, is proposing the adoption of Koranic values as a cure for the ills of political terror and economic crisis that led to the overthrow of the right-wing administration of Suleyman Demirel. It wants Turkey to stop being a secular Moslem state and, like Libya, Iran and Pakistan, adopt the Koran as its constitution.

The movement also wants Turkey to sever its ties with the West, quit the North Atlantic Treaty Organization (NATO) and make a bid for the leadership of the Islamic world.

The Islamic movement is strongest in Konya, about 200 miles south of Ankara.

The prosperous market town, situated on a flat plain that produces most of Turkey's grain and sugar beets, has a population of 700,000 and 510 mosques. Fifty new mosques are under construction.

Posters declare that "alcohol is a social plague and everything that intoxicates is sinful." The only nightclub is half empty, and the sole pub has its blinds drawn all the time so as not to offend the faithful for whom, in the words of the Koran, "wine and lots are the abomination of the Satan."

The Islamic fundamentalist movement gained momentum in Turkey in 1973, when Necmettin Erbakan's Islamic National Salvation Party won nearly 50 of the assembly's 450 seats, unexpectedly becoming Turkey's third biggest party after Bulent Ecevit's Republican People's Party and Demirel's Justice Party.

In the seven years until the military takeover, Erbakan, a deputy from Konya, played a prominent and, according to many, destructive role in the affairs of the nation. With no party having a parliamentary majority, he became a kingmaker. He gained seats and say in several governments vastly in excess of his parliamentary power.

Many political observers believe his greed for power and political dishonesty contributed greatly to Turkey's instability and eventual decline into a state of near-collapse during his period.

Erbakan lost half of his strength in parliament at the 1977 general election, his antics repulsing even some of his followers, but his political influence did not abate.

The corpulent professor of mechanics strove to push the Islamic movement beyond the limits permissible under Turkish law. He committed, in the eyes of the Army and the intelligentsia, the unforgivable sin of trying to undo the work of Ataturk and turn the country into an Islamic state.

The Army thinks that Erbakan went over the brink during a rally he staged in Konya. In the demonstration, in which 80,000 people participated, men wearing turbans openly demanded an end to secularism and brandished slogans in Arabic script. A group refused to stand up when the national athem was played. Shops selling beer were stoned.

A few days after this rally, which a general called "the last straw," the Army took over in a bloodless coup.

Following the coup, politica, leaders were sent into internal exile. Subsequently Demirel and Ecevit were released. Erbakan is still in jail along with the entire leadership of his party and many of his provincial politicians. Also in jail is Alparslan Turkes, leader of the extreme right-wing Nationalist Action Party and hundreds of his militant supporters. They are to be charged with participating in right-wing terror and working to set up a fascist state.

Gen. Kenan Evren, the chief of staff who became the head of state, is determined to uproot all extremes, and with it Islamic fanaticism. Erbakan and Turkes are likely to get long prison terms, and their parties probably will cease to exist. The Army is expected to introduce a two-party system when democracy is restored, hoping this will be conducive to stability.

Islamic fundamentalists in Konya realize that their leadership and party are doomed, and they feel discriminated against. The arrest of religious leaders, the confiscation of some religious books, and the order against wearing beards or kerchiefs in government offices created resentment. There is also resentament against the purge of pro-Erbakan civil servants.

"Democratic ways of expression should not be blocked," said a prominent citizen of Konya. "Otherwise there may be an Islamic uprising like in Iran."

This is probably an overly dramatic evaluation. Evren is the son of an imam and has promised to respect religious freedom. But he wants to keep religion in the mosque. And even Konya is changing as the younger generation drifts away from old values and traditions.

"Don't think that we are all like that," said a local politician, interviewed by an English woman journalist, pointing at an old man pulling on his prayer beads as he slowly walked. "I am going to a party tonight. If you want to see the other side of Konya come with me."