"The only way to succeed is to continue to resist the occupation," Khamenei said. "The Palestinian people knew voting for Hamas marks the continuation of fighting against the Zionist occupation regime."
Later, Mashaal met with Iranian President Mahmoud Ahmadinejad.
Khaled Mashaal with Khamenei (Photo: AP)
Khamenei noted Hamas' recent election victory was a "sweet surprise, and proof Allah's promises materialize." His comments were quoted by Iran's official news agency. The country's spiritual leader also called for unity among Palestinians, which he said was necessary in order to achieve their national goals.
'Palestinians intelligent, politically mature'
Mashaal, meanwhile, praised Iran's position, and noted "Hamas' victory belongs to all Muslim nations. Of course Iran has a part in the triumph."
"This victory was a blessing by the almighty, meant to spare the blood of the oppressed and reward the martyrs," Mashaal said.
Khamenei later lauded Hamas for continuing its elections campaign despite the obstacles, saying "they continued the campaign until Allah's promises were fulfilled one after the other."
"All those victories are a result of resistance to the occupation," Khamenei said, and praised the Palestinian people for being "intelligent and politically mature" and voting for Hamas with the knowledge this will mean continued resistance.
Iran's spiritual leader backed Mashaal's position, which rejects recognition of Israel, and demanded Palestinian refugees be allowed to return to Israel and the establishment of a Palestinian state with Jerusalem as its capital.
"This is the only way to succeed," Khamenei said.
Khamenei also called on Arab countries to assist the new Hamas-led government and back its refusal to recognize Israel.
"Such support will boost the link between Muslims and Palestinians and have great influence on the world, while also boosting the moral of those facing Israel's systematic belligerence," he said.
Mashaal arrived in Tehran from Syria, where he met with senior Turkish officials and discussed with them financial aid to the Palestinian government. Hamas leaders are expected to visit more countries in the coming days are hoping to visit Kuwait during the tour.
Ali Waked contributed to the story