Seogwipo, South Korea:Slovenia coach Srecko Katanec said Wednesday he would resign at the end of his side's World Cup campaign following a clash with the team's biggest star, Zlatko Zahovic. "Katanec has decided that he will remain at the helm of the national team only until the team is eliminated and then resign," Slovenia soccer federation president Rudi Zavrl told The Associated Press. Katanec clashed with Zahovic after Slovenia's 3-1 loss to Spain in their opening Group B game Sunday. The Benfica Lisbon midfielder approached Katanec after being taken off the field in the 64th minute and had sharp words with him. The tirade continued in the dressing room, where Zahovic screamed at the coach, according to sources close to the team. "I'm not used to this sort of communication. I was shocked when Zahovic attacked me," an emotional Katanec told a new conference Wednesday before breaking into tears and walking out of the room. Katanec later said Zahovic insulted him in front of the entire team, accusing him of favoring players from the region around Slovenia's capital of Ljubljana over those from other parts of the tiny Central European country of 1.9 million people. Katanec said he was a "professional" and would do his best to lead the team in its remaining World Cup games. Zavrl said that Zahovic would remain with the team, despite the incident. "A very serious thing happened without any doubt. We've never seen anything like this," he said. "But after consulting the players, it was decided that Zahovic would stay." Officials who witnessed Sunday's incident said the two men nearly came to blows after the match and that players had to intervene to separate them. Katanec, a former defender with Dinamo Zagreb and Italy's Sampdoria, became Slovenia's coach in 1998 at age 35. He is credited with leading Slovenia to a successful debut at Euro 2000 and through the qualifying stages for its first ever World Cup finals. Slovenia plays South Africa Saturday and meets Paraguay on June 12.