The Iranian government does not recognize the state of Israel, and has no official ties with the country, which Iranian officials repeatedly have vowed to destroy.
Ehsan Hajsafi and Masoud Shojaei, who play for Greek side Panionios, took part in last week's Europa League third qualifying round second leg match against Maccabi Tel Aviv, having refused to travel to Israel for the first leg, a week earlier.
"Well done to Masoud Shojaei and Ehsan Haji Safi who broke the taboo of not playing in matches against Israeli athletes", it said on its IsraelPersian twitter account.
"Both players have stepped over the red line and will therefore be excluded from the national team", deputy sports minister Mohamed Rese Dawarsani was quoted by Iranian media as saying.
Iran could run into trouble with Federation Internationale de Football Association, soccer's world governing body, over the incident.
Critics in Iran say the ban on competing against Israel has hurt the development of Iranian athletes, forcing them to forfeit or pull out of competitions in which they might face Israeli athletes.
But both played the full 90 minutes in the August 4 match in Greece, which their team lost, 1-0.
"I am wholeheartedly hoping for Federation Internationale de Football Association to deprive Iran from participating in the World Cup for banning Shojaei and Haji Safi", said another Iranian soccer fan, Hushang Mirza, on Twitter, referring to soccer's world governing body.
"Iranian footballers need to be internationalized and play in (Europe) to bring hard currency and new techniques and experience to help domestic football", said Ali Samienia, a 64-year-old coach in a youth soccer league in Tehran. It's not a big deal.
Iranian hard-liners have been asserting themselves in recent months following the re-election victory of President Hassan Rouhani, a relative moderate. The country has already qualified for the 2018 FIFA World Cup, but Shojaei and Haji Safi would've been invaluable as Iran looks to advance to the knockout stages of the tournament for the first time next summer in Russian Federation.