YEREVAN, Armenia — Armenia's prime minister spoke of an attempted military coup Thursday after the military's General Staff demanded that he step down after months of protests sparked by the nation's defeat in the Nagorno-Karabakh conflict with Azerbaijan.

The General Staff issued a statement calling for the resignation of Prime Minister Nikol Pashinyan, which was signed by top military officers. The move was triggered by Pashinyan's decision earlier this week to oust the first deputy chief of the General Staff.

Pashinyan described the military's statement as a "military coup attempt" and ordered the firing of the General Staff's chief. He urged the military to only listen to his orders and called on his supporters to come to the streets to back him.

TRUMP ANNOUNCES NEW ARMENIA-AZERBAIJAN CONFLICT CEASEFIRE BROKERED BY US

Meanwhile, throngs of opposition demonstrators swarmed the streets of the Armenian capital, chanting "Nikol, you traitor!" and "Nikol, resign!"

Opposition supporters blocked the streets around Yerevan, paralyzing traffic all around the capital.

The quick-paced developments came after Armenia saw a spike in demonstrations this week demanding that Pashinyan step down.

Protests calling for Pashinyan's resignation began immediately after he signed the Nov. 10 peace deal that saw Azerbaijan reclaim control over large parts of Nagorno-Karabakh and surrounding areas. The Russia-brokered agreement ended 44 days of fierce fighting in which the Azerbaijani army routed Armenian forces.

Pashinyan has defended the peace deal as a painful but necessary move to prevent Azerbaijan from overrunning the entire Nagorno-Karabakh region.

Nagorno-Karabakh lies within Azerbaijan but was under the control of ethnic Armenian forces backed by Armenia since a separatist war there ended in 1994. That war left Nagorno-Karabakh itself and substantial surrounding territory in Armenian hands.

Heavy fighting that erupted in late September marked the biggest escalation of the decades-old conflict between Armenia and Azerbaijan, killing more than 6,000 people on both sides.

Despite the simmering public anger over the military defeat, Pashinyan has maneuvered to shore up his rule and the protests died down amid the winter's cold. But the opposition demonstrations resumed with new vigor this week, and the spat between Pashinyan and the top military commanders has weakened his position.

CLICK HERE TO GET THE FOX NEWS APP

Pashinyan fired the deputy chief of the General Staff, Lt. Gen. Tiran Khachatryan, earlier this week after he derided the prime minister's claim that just 10% of Russia-supplied Iskander missiles that Armenia used in the conflict exploded on impact.

The General Staff responded Thursday with a statement demanding Pashinyan's resignation and warned the government against trying to use force against the opposition demonstrators. Immediately after the statement, Pashinyan fired the General Staff chief, Col. Gen. Onik Gasparyan.