Russia, which maintains a military base in Armenia, has kept its distance from the crisis, stating repeatedly that it is an internal matter and urging all sides to settle their differences legally.
Still, Armenia, a miniature country of some 2.8 million people in the southern Caucasus, was moving into uncharted territory.
“This is unprecedented,” said Emil Sanamyan, an analyst with the University of Southern California’s Institute of Armenian Studies. The defeat takes Mr. Pashinyan, who had been riding a wave of protest euphoria, “down a notch politically,” Mr. Sanamyan said. “That creates an unstable, uncertain situation.”
The country seemed locked in an extended civics lesson on Tuesday as citizens gathered around car radios or television monitors throughout the day to listen to the parliamentary proceedings.
In Parliament, Mr. Pashinyan and his supporters tried to leverage the street demonstrations of the past two weeks, which had already forced the resignation of Serzh Sargsyan, the man who had led Armenia since 2008, into a vote to make the opposition figure the country’s next leader.
“Hundreds of thousands of citizens of Armenia are standing on streets and squares with one question,” Mr. Pashinyan told the extraordinary Parliament session, which was streamed live by Civilnet.am. “Is the Parliament of the Republic of Armenia a body that will solve the crisis, or is it a body that will deepen the crisis?”
The Parliament voted 56 to 45 against Mr. Pashinyan, with only one member of the Republican Party supporting him. He needed a simple majority of the 105-member body to win. A second such vote will be held in a week, on May 8, and if he again fails to gain a majority, the country must hold snap elections 30 to 45 days later.
Throughout the day, members of the Republican Party attacked Mr. Pashinyan, a 42-year-old former journalist and father of four, on personal grounds. They found fault with everything from his signature camouflage T-shirts to his lack of high-level political or military experience, even suggesting that he was better suited to the parliamentary backbenches than the prime minister’s office.
Arman Saghetelyan, a former press secretary for Mr. Sargsyan, said that he and fellow military veterans thought that being commander in chief of the armed forces required “more than a hunting T-shirt that costs 4.99 euros.” (The opposition leader had traded his T-shirt for a dark suit and tie for the vote.)
Other lawmakers found the very idea of trying to use the street protests to become prime minister galling. “This is completely abnormal,” said Karine Atshemyan, who is also a member of the Republican Party. “It has never happened that the political minority in any country would dictate to the Parliament, to the political majority.”
Mr. Pashinyan, who has no political party of his own, gave two speeches and answered questions for about four hours, repeatedly emphasizing that the demand for change in Armenia would move forward whether the Republicans accepted it or not.
He and his allies also vowed to break up the political and economic monopolies that have controlled the country for years.
That is likely to have been the most significant threat that tipped the vote against him, said Mr. Sanamyan, the analyst, as the Republican Party has strong ties to the business community, and lawmakers probably want to negotiate some form of guarantees before considering him as a candidate for prime minister.
Members repeatedly said that they wanted more time to negotiate with Mr. Pashinyan.
The party did not put forward Karen Karapetyan, the acting prime minister and a Sargsyan ally, as a candidate.
Mr. Pashinyan was the only nominee, but anyone who garners support from one-third of the members can stand next week.
Mr. Pashinyan has said that the main task of any interim government is organizing the next parliamentary elections. It remains unclear whether the Republicans, markedly less popular with the public, wanted to give up their influence over the process.
The vote in Parliament on Tuesday came after large-scale demonstrations across Armenia, led by Mr. Pashinyan, roiled the government and forced Mr. Sargsyan to step down.
The protests erupted after Mr. Sargsyan, operating under a 2015 constitutional referendum that had transferred most presidential powers to the prime minister, tried to skirt term limits by changing jobs.
The public fury — with some 100,000 demonstrators gathering at times in central Yerevan — pushed him to resign 10 days later. In a brief statement, he said he had made a mistake and would listen to the demands from the street.
Mr. Pashinyan’s demand to take over is appealing, especially among young Armenians, who joined the protests in droves, angry that the same small club of politicians and oligarchs has controlled the country since independence from the Soviet Union in 1991. Armenia has remained a partner to Russia, however.
On Tuesday, critics repeatedly mentioned Mr. Pashinyan’s previous opposition to Armenia’s decision to join the Eurasian Economic Union, a Kremlin project, and tried to link him to various Kremlin critics like Mikheil Saakashvili, the exiled former president of neighboring Georgia.
Mr. Pashinyan has sought to assure Russia, which intervened militarily in Ukraine and Georgia after similar popular revolts, that Armenia would remain an important ally.