Asked about his gesture afterwards, Costa lashed out by claiming Iran had been the main culprits.
"What game were you watching?" he shot back.
Spain tied 3-3 with Portugal on Friday in their first worldwide match under newly-minted head coach Hierro, who took the job just two days before the World Cup after Julen Lopetegui was sacked for announcing he would lead Real Madrid next season. "I really admire him".
"The truth is I had a bit of luck (with the goal)", said the Atletico Madrid star after the game.
Spain, looking to emulate their 2010 triumph when Andres Iniesta hit an extra-time victor to deny the Netherlands in the final, now sit top of Group B before a final match against Morocco, who restricted Portugal to a 1-0 win earlier on Wednesday.
The tension last night was palpable on the Spain bench, which is headed by former Spanish Royal Football Federation (RFEF) sporting director Fernando Hierro, who stepped into the role just days before the team's first game, against Portugal (3-3). You get a flash interview and people say things aren't working, but we have four points.
Iran beat Morocco, who are now eliminated, in their opener and will be aiming to produce a stunning upset in their final match.
With the "easy" game over and done with, Iran will now turn their attentions to the two more-difficult tests ahead, starting with Wednesday's meeting with 2010 champions Spain.
"Now we have to forget Portugal and concentrate on Iran".
"He was taken to hospital".
Iran thought they had found the equalizer soon after, but another feather in the cap for the Video Assistant Referee saw the goal correctly ruled out for offside.
"It was very hard for everyone, but we have three points, that's what matters", Hierro said.
The staff member - who was not named - apparently fell ill after the goal was chalked off. Iran went on to lose the game, and coach Queiroz confirmed afterwards that the man had been taken to hospital. "We hope everything will be alright".
Apart from one or two dribbles, Jahanbakhsh - the top scorer in the Eredivisie last season - was fairly quiet, while Azmoun might have been amongst the goals had his first touch at the crucial moment not let him down.