Police warned the editor of The Cape Times today that he might be prosecuted for publishing an interview with the president of the outlawed African National Congress yesterday, but readers flooded the liberal Cape Town newspaper with congratulatory messages.

Officials also called on the prominent mixed-race theologian, the Rev. Allan Boesak, today to inform him that the government had overruled a court decision returning his passport, which means he will not be able to make a planned trip to the United States next week to receive a humanitarian award.

Seven pastors of the influential Dutch Reformed Church also were forced today to abandon plans to meet with leaders of the exiled African National Congress when a government minister warned them that they would not be allowed to leave the country.

All three actions reflect a hardening attitude by the government of President Pieter W. Botha as it comes under increasing pressure from racial violence, mounting internal criticism and intensifying international condemnation.

The minister of law and order, Louis le Grange, was quoted by the semiofficial South African Broadcasting Corp. this morning as saying he had called for prosecution of the editor of The Cape Times, Anthony Heard, for publishing the lengthy interview with congress leader Oliver Tambo yesterday.

Soon afterward, Heard said in a telephone interview from Cape Town, where his newspaper is the leading morning daily, that a lieutenant of the security police had arrived at his office to warn him that an investigation into a possible breach of the law was being launched.

Under South Africa's stringent security laws it is a crime to quote any individual or organization declared "banned" by the government. The congress, South Africa's main black nationalist movement, was banned nearly 25 years ago, and no full statement by the organization or its leaders had appeared inside the country until Heard published his 3,600-word interview with Tambo, which took place in London a few days ago.

If he were prosecuted, the editor could be sentenced to three years' imprisonment. The law also allows the minister of law and order to close down a newspaper if he believes it is "furthering the aims of communism." The government has said it regards the group as communist.

Heard said today he had been anxious about the implications of defying the law, but had published the interview because he felt it was "overwhelmingly in the national interest" that South Africans know where the organization stood on crucial issues.

Heard said The Cape Times had received hundreds of calls today from readers expressing appreciation at being able to read the ANC leader's views and surprise at the apparent pragmatism they revealed.

"I think what has happened is that people have realized for the first time just how deprived of firsthand information they are," he added.

Magistrate W.A. de Klerk ordered Boesak's passport returned yesterday, when he granted relaxed bail conditions for the theologian, who has been charged with subversion because of his campaign against the apartheid system of segregation.

This opened the way for Boesak to travel to the United States to received the Robert F. Kennedy human rights award Nov. 20.

But two officials, acting on orders from Home Affairs Minister Stoffel Botha, went to Boesak's home in a township outside Cape Town today to tell him his passport had been withdrawn. They gave no reasons.

Boesak described the withdrawal as "an act of petty vindictiveness" and "another sign that this country has no respect for the courts or the rule of law."

Stoffel Botha also scuttled the plans of the seven Dutch Reformed Church pastors to visit Lusaka, Zambia, for talks with the congress.

Nico Smith, leader of the group, said they held talks with Stoffel Botha today following sharp criticism of their plans by President Botha.