Chairman Deng Xiaoping, de facto leader of China at the time and architect of the decision to use martial law, delivered an address to his military commanders June 9th, 1989 a few days after the protests had been crushed. In summation, this was not viewed as just a student anti-corruption protest, which he considered an acceptable grievance, but as a counter-revolutionary rebellion lead by "bad people". Whether he truly believed this was a malicious threat to his country, or a clever bit of political slight-of-hand, I do not know.
Here is the relevant opening paragraphs of that speech. Italics are mine.
I'd like to take this opportunity to say a few words. This storm was bound to happen sooner or later. As determined by the international and domestic climate, it was bound to happen and was independent of man's will. It was just a matter of time and scale. It has turned out in our favor, for we still have a large group of veterans who have experienced many storms and have a thorough understanding of things. They were on the side of taking resolute action to counter the turmoil. Although some comrades may not understand this now, they will understand eventually and will support the decision of the Central Committee.
The April 26 editorial of the People's Daily classified the problem as turmoil. The word was appropriate, but some people objected to the word and tried to amend it. But what has happened shows that this verdict was right. It was also inevitable that the turmoil would develop into a counter-revolutionary rebellion.
We still have a group of senior comrades who are alive, we still have the army, and we also have a group of core cadres who took part in the revolution at various times. That is why it was relatively easy for us to handle the present matter. The main difficulty in handling this matter lay in that we had never experienced such a situation before, in which a small minority of bad people mixed with so many young students and onlookers. We did not have a clear picture of the situation, and this prevented us from taking some actions that we should have taken earlier.
It would have been difficult for us to understand the nature of the matter had we not had the support of so many senior comrades. Some comrades didn't understand this point. They thought it was simply a matter of how to treat the masses. Actually, what we faced was not just some ordinary people who were misguided, but also a rebellious clique and a large quantity of the dregs of society. The key point is that they wanted to overthrow our state and the party. Failing to understand this means failing to understand the nature of the matter. I believe that after serious work we can win the support of the great majority of comrades within the party.
The nature of the matter became clear soon after it erupted. They had two main slogans: to overthrow the Communist Party and topple the socialist system. Their goal was to establish a bourgeois republic entirely dependent on the West. Of course we accept people's demands for combating corruption. We are even ready to listen to some persons with ulterior motives when they raise the slogan about fighting corruption. However, such slogans were just a front. Their real aim was to overthrow the Communist Party and topple the socialist system.
During the course of quelling the rebellion, many comrades of ours were wounded or even sacrificed their lives. Some of their weapons were also taken from them by the rioters. Why? Because bad people mingled with the good, which made it difficult for us to take the firm measures that were necessary.
Handling this matter amounted to a severe political test for our army, and what happened shows that our People's Liberation Army passed muster. If tanks were used to roll over people, this would have created a confusion between right and wrong among the people nationwide. That is why I have to thank the P.L.A. officers and men for using this approach to handle the rebellion.
The P.L.A. losses were great, but this enabled us to win the support of the people and made those who can't tell right from wrong change their viewpoint. They can see what kind of people the P.L.A. are, whether there was bloodshed at Tiananmen, and who were those that shed blood.