Bulgaria are second in the standings with 13 points from nine matches, seven points behind group winners Italy, who have already qualified for next year’s tournament in Brazil.
Armenia moved into third place with 12 points from nine games, but Denmark, also on 12 points, had a chance to go second in the group when they hosted Italy later on Friday.
Luboslav Penev’s Bulgaria, alongside Iceland in Group E, also have the lowest points total of any second-placed sides in European qualifying, meaning they risk missing the playoffs even if they finish runners-up.
Armenia went ahead just before half-time when Aras Ozbilis gave Bulgarian goalkeeper Vladislav Stoyanov no chance with a perfectly struck free kick, awarded for a clumsy Nikolay Bodurov challenge.
Bodurov received a straight red card but Bulgaria defied his absence and drew level on 61 minutes when their skipper, Ivelin Popov, found the net with another brilliant free kick, making up for two opportunities that had been missed by Emil Gargorov and Stanislav Manolev.
But just two minutes later, Bulgarian midfielder Svetoslav Dyakov joined Bodurov on the sidelines as he was sent off for a second bookable offence.
Yura Movsisyan ran clear of the visitors’ defence to score four minutes from time to secure Armenia’s first home triumph of the campaign.
Earlier, Bulgaria’s national anthem was booed and whistled by large groups of home fans.
It extended a hostile welcome that had begun when dozen of fans had subjected the Bulgarian team to abuse and hurled objects at them on their arrival at Yerevan airport on Thursday.
In September 2012, Armenia filed a protest with soccer’s ruling body FIFA about “poor officiating” and the treatment they received from the home team during a 1-0 qualifying defeat in Bulgaria.
(Writing by Angel Krasimirov, Editing by Tom Bartlett)