The Republic of Ireland came back from a two-goal deficit to beat Armenia in a chaotic Nations League game.
The Republic won the game after a wild second half in which Armenia scored two goals in three minutes and two players were sent off.
The Republic two was put up by John and Michael.
Brady was given the chance to win the game when Dashyan was shown a red card for handling the ball after reviewing the incident on the monitor.
Dashyan and Hambartsumyan were both kicked out of the country.
The Republic of Ireland would have been demoted to League C if they had lost, but Stephen Kenny's side will stay in Pot Three in the Euro 2024 qualification draw.
Kenny thought it was a great performance until the 75th minute.
"Michael Obafemi's goal, numerous chances, a lot of good play and then we just had a few minutes of madness, so there are good learnings for us in that."
It was important for us to get the third goal because we were convincing winners and it never should have been close to 2-2. We won the game and that's all that matters.
After a thrilling win over Scotland and a creditable draw against Ukrainians, the Republic needed to avoid a shock loss to Armenia.
While Armenia stunned the Republic with a 1-0 win in Yerevan in June, they failed to lay a glove on the hosts for much of Tuesday's contest, allowing their hosts to build early confidence.
The home side took the lead just three minutes later when Egan headed Brady's corner.
It seemed as though the Republic were going for a straightforward win when Obafemi added a second after spinning away from his marker.
The country had other ideas. The Republic were punished for falling asleep at the back as the visitors were able to drag themselves back into the game.
Dashyan was given time to fire home from outside the box and pull one back.
The stadium was stunned less than two minutes later when Spertsyan scored the winning goal.
Kenny's side were lucky not to go behind when Bayramyan's effort from the edge of the box flew narrowly wide.
The penalty drama followed. The VAR advised the ref to review the incident on the monitor after he initially waved away Irish appeals.
When he pointed to the spot, Hambartsumyan's furious remonstrations earned the full-back two yellow cards in quick succession, while Dashyan was also dismissed after he received a second caution for arguing with the referee.
Brady kept his cool, slotting his penalty into the corner to ensure that the Republic ended the night on a high.