The two matches were to be played in September. But the soccer associations from both countries couldn't agree on where.
Relations between Armenia and Azerbaijan have been sour since the early 1990s when they fought a war over the predominantly ethnic Armenian enclave of Nagorno-Karabakh.
Armenia did not object to the matches taking place in Armenia and Azerbaijan.
But Azerbaijan wanted the games held on neutral territory. Baku said it would be difficult to guarantee the safety of the Armenian players on Azerbaijani territory.
Chief coach of the Azerbaijani soccer team, Shahin Diniyev, said the decision came as a surprise.
"We were gathering information and preparing to play right up until the final day. I'd say that, after this decision was announced, neither teams are winners or losers," Diniyev said.
The head of the Armenian Football Federation Ruben Hairapetian thought that Armenia was the definite loser from the decision.
"It was bad for Armenia because our national team is stronger. It was a chance [for us] to gain more points in the tournament," Hairapetian said.
In the Euro 2008 qualifying Group A, Armenia lies in fifth place, with Azerbaijan bringing up the rear. Poland are the group leaders, followed by Serbia, Portugal, and Finland.
Despite the UEFA decision, both teams would have little chance of qualifying for the Euro 2008 championship, to be held in Austria and Switzerland next year.
In Yerevan, soccer fans' reactions were mixed.
"There is no doubt that it was a political decision, because they could have played in a neutral country. And there is no doubt that we would have won the game. That's why, by taking this unjust decision, they wanted to make it easier, to avoid headaches," one fan said.
But another Armenian fan thought UEFA was right. "It punished both of them. It was a very good decision. It said to both teams, just go away," he said.
Fans in Baku who spoke to RFE/RL were no different.
"It would be better if they met. In this case, we would know our team's ability. I was expecting a lot fm this [match]. It's a pity that they will not play together," one male fan said.
Another believed it was the right decision, due to the safety aspects.
"It's a fair decision, because anything could happen [at a game between the two]," he said.
Previous matches between Armenian and Azerbaijani teams -- at an international and club level -- have been marred by difficulties.
At a Commonwealth Cup game in 2005, there were fights between players from Armenia's Pyunik Yerevan and Azerbaijan's Neftchi Baku.
The cup brings together all the league champions from the 15 former Soviet republics.
And a return fixture between the two teams to be played in Moscow in January 2006 never took place. Pyunik Yerevan withdrew, saying it feared for the safety of its players.
(RFE/RL's Armenia and Azerbaijani services provided the material for this report)
The Nagorno-Karabakh Conflict
Click on the image to view an enlarged map of the Nagorno-Karabakh conflict zone
In February 1988, the local assembly in Stepanakert, the local capital of the Azerbaijani region of NAGORNO-KARABAKH, passed a resolution calling for unification of the predominantly ethnic-Armenian region with Armenia. There were reports of violence against local Azeris, followed by attacks against Armenians in the Azerbaijani city of Sumgait. In 1991-92, Azerbaijani forces launched an offensive against separatist forces in Nagorno-Karabakh, but the Armenians counterattacked and by 1993-94 had seized almost all of the region, as well as vast areas around it. About 600,000 Azeris were displaced and as many as 25,000 people were killed before a Russian-brokered cease-fire was imposed in May 1994.
CHRONOLOGY: For an annotated timeline of the fighting around Nagorno-Karabakh in 1988-94 and the long search for a permanent settlement to the conflict, click here.Click on the icon to view images of the Nagorno-Karabakh conflict (Flash required)
To view an archive of all of RFE/RL's coverage of Nagorno-Karabakh, click here.