KARIM JAAFAR/Getty Images

The Iran national football federation banned Masoud Shojaei and Ehsan Haji Safi from the national team after they played in a Europa Leauge qualifier against Maccabi Tel Aviv.

According to ESPN FC, Iran prohibits its athletes from facing Israeli opponents since the Iranian government doesn't recognize Israel as a sovereign nation.

Shojaei and Haji Safi started and played the full 90 minutes for Panionios, a club in the Greek Super League, in an Aug. 3 match against Maccabi Tel Aviv. Maccabi Tel Aviv won 1-0 to go through to the Europa League playoff on a 2-0 aggregate score.

"It is certain that Masoud Shojaei and Ehsan Haji Safi will never be invited to join the national football team because they violated the red line," said Mohammad Reza Davarzani, Iran's deputy sports minister, on Iranian state television, according to the New York Times' Thomas Erdbrink.

Prior to his lifetime ban, Shojaei was the captain of the Iran national team and had made 71 appearances, scoring eight goals. Haji Safi, meanwhile, had 82 caps for the national team.

Their absences will come at a bad time for Iran. 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 Russia.