Iran lost 6-4 in the game, which was played at Newton de Faria gym in Anapolis on Friday.
The Iranians were ahead 3-1 after the first half but gave up five goals to the Spaniards in the second half while managing to only find the back of the net one more time.
Javad Asghari scored twice and Masoud Daneshvar and Mohammad Taheri also had goals for the Iranian team.
Iran defeated Argentina 2-0 to advance to the semifinal thanks to goals by Mostafa Tayyebi and Ehsan Zahmatkesh in extra time.
Iran will take on Paraguay on Saturday in the match to determine third place and Spain will meet Brazil in the final on Sunday.
The Futsal Grand Prix 2010, known as the Futsal Mini-World Cup, kicked off on October 17 and runs until October 24.
Iran reached the finals of the Grand Prix de Futsal in 2007 and 2009 but finished runner-up both times. They lost 7-1 to Brazil in the final of the previous edition.
“We will hopefully become runner-up again. Iran is gearing up for the Futsal World Cup and this kind of competition will help us have a better performance,” Iran coach Hossein Shams said in August.
The Grand Prix de Futsal is an international futsal competition of the same kind as the FIFA Futsal World Championship but the difference is that nations are invited to the tourney and it has been held annually in Brazil since 2005.
Iran has a strong national futsal team, which has won all the editions of the Asian Futsal Championship except one. It also has some of the best futsal players on the continent and also in the world, including Vahid Shamsaei, the world's all-time leading futsal scorer with over 330 goals.
The Iranians are the 4th strongest team in the world according to the Futsal World Rankings.
The ten-time winners of the Asian Futsal Championship have played in five editions of the FIFA Futsal World Championship, reaching the semi-finals in their first appearance in 1992. Iran won the First FIFA Futsal Confederations Cup in Libya in 2009.