KIEV, Ukraine — Ukraine appeared mired in a political standoff Tuesday, as massive protest rallies showed no sign of letting up and the government warned of its capability for force after a failed attempt to take it down.

The opposition lost its attempt to topple the government by parliamentary means when a vote of no-confidence failed by a sizeable margin.

President Viktor Yanukovych left on an official visit to China, where he is expected to sign an array of economic agreements, his office said. He is expected to be gone until Friday and the prospects for a definitive development in the next few days seem small.

Protest leaders vowed to continue their demonstrations, which have brought as many as 300,000 people to the streets of Kiev, in the largest outpouring of public anger since the 2004 Orange Revolution.

Soon after Tuesday’s vote, about 5,000 protesters gathered outside the presidential administration building, then moved to the capital’s central Independence Square, where the crowd grew to more than 10,000, according to police estimates.

The opposition called for the parliamentary vote over Yanukovych’s shelving of a long-anticipated agreement to deepen political and economic ties with the European Union and the violent tactics used by police to disperse demonstrators protesting the decision.

Yanukovych has sought to quell public anger by moving to renew talks with Brussels.

But while Prime Minister Mykola Azarov, attending the parliamentary session with his Cabinet, apologized for the violence, he also made a tough vow.

“We have extended our hand to you, but if we encounter a fist, I will be frank, we have enough force,” he said.

There is a question as to how long protesters’ determination will last as winter sets in and the holiday period approaches, noted Adrian Karatnycky, a Ukraine analyst at the Atlantic Council think tank.

The no-confidence measure got the support of 186 members of the Verkhovna Rada, 40 shy of the majority needed. Even if it had passed, Yanukovych would have remained president, but the prime minister and Cabinet would have been ejected.