President Julio Cesar Turbay Ayala said in an interview last night that his government will not give into demands of leftist M-19 guerrillas holding the Dominican Embassy here for a $50 million ransom and the release of 311 prisoners from Colombia's jails.

Speaking three weeks after the seizure of the embassy, where the guerrillas are holding more than 30 hostages, including U.S. Ambassador Diego C. Asencio, Turbay indicated his position will not change regardless of future negotiations with or threats from M-19.

"It is not in the nature of Colombia's institutions or of its people to give in to blackmail," Turbay, 53, said of the situation at the embassy, which he called "the most difficult problem [in] the republic's 170-year history."

Turbay said that the country's laws preclude the payment of ransom, that only the courts can order the release of convicted prisoners and that only the Congress can declare an amnesty.

Although the president last week ordered a speedup of military trials now in progress, a measure that could result in some of the prisoners demanded by the M-19 being freed if they are found innocent, Turbay said he did not think it likely that convicted "robbers and assassins" would be freed by the courts or that the Congress would declare an amnesty.

Turbay said he still hoped that the siege at the embassy would be resolved without further loss of life. And he underscored several times that his government will do nothing to provoke the guerrillas or to storm the emasssy unless the M-19 violates "the physical integrity" of one of the hostages. But he also said that "there are certain points that are nonnegotiable: "a government cannot negotiate its institutions . . . nor the rule of law."

For 45 minutes last night, Turbay explained his government's determination to seek a peaceful end to the affair without violating its principles by giving in to the guerillas' demands.

He spoke from behind an antique desk in his elegant office at the Palacio Narino in the heart of old Bogota. He surrounded by six telephones, the books and papers of state and two portraits: one of Francisco de Paula Santander, who fought alongside Bolivar and later wrote the laws that be come the foundation of Colombia's democratic system, and the second of Alfredo Lopez Pumarejo, a more recent president who was Turbay's political mentor.

Despite extreme pressure from some of the governments whose envoys or nationals are being held hostage in the embassy, Turbay said that if his government were to meet the M-19's demands, its decision could become a precedent for other situations and could endanger the lives o diplomats around the world. He said this was a major consideration in not giving into the guerrillas here.

"The concept of war is no longer one of battles betwen regular armies but rather of the kind that now confronts us here," he said. "In this way, the attack on the embassy of the Dominican Republic is part of a chain of attacks that terrorists throughout the world have undertaken against the rule of law ans itslegitimate representatives."

The M-19, Turbay said, "evidently thought taht with this act they could destroy the Colombian government . . . finish it off and get all they wanted in a way that would tremendously strengthen terrorist groups everywhere.

"My impression is that they calculated badly."

Specifically, Turbay said, the government will not release even one of the 311 prisoners the guerrillas originally demanded nor pay any ransom money to secure the safe release of the hostages.

On the other hand, Turbay said, his government will under no circumstances provoke the guerrillas or storm the embassy unless the guerrillas physically harm a hostage. Turbay said the government has offered the M-19 safe passage out of Colombia whenever they are ready to leave and is not opposed to the payment of ransom by countries, humanitarian groups or friends of the approximately 20 diplomats and 11 otehr hostages who remains inside the embassy.

The only time Turbay raised his voice during the interview was when he was asked about the substance of his conversations with President Carter and other U.S. officials. He answered:

"They don't pay! The United States won't pay" he said excitedly. "I have received, much to my satisfaction, the support of the vast majority of governments [whose diplomats are in the embassy]. Among them the United States. They know we are handling the situation seriously and calmly."

It is known that the principal concern of the United States has been to avoid a precipitious response by the Colombian government, in a particular any attempt by the troops who have surrounded the embassy to retake the building by force unless the guerrillas begin killing their hostages.

As the seige entered its 22nd day today, there appeared to be no movement on either side to bring it toward a conslusion. Turbay said several times during the interview that his government is prepared to allow the guerrillas to remain with the hostages in the embassy indefinitely as long as there is no violence.

"We must take special care not to act in an unnecessarily provocative way and theeby endanger the hostages lives," he said.

As for the possibility of his finding a loophole in the law that would allow him to release at leas some of the prisoners demanded by the M-19, Turbay said that he could be "punished politically and criminally" if he were to violate the laws or the constitution.