Iranian President Hassan Rohani has praised European Union countries helping the refugees streaming into the 28-nation bloc and urged others to step up their efforts.
The remarks, published on Rohani's website Sunday, came during a meeting with the new Hungarian ambassador in Tehran and were seen as indirect criticism of Budapest's handling of the situation.
He said: "We are happy that some European countries made positive efforts to help refugees and we hope other European countries that do not have this position compensate on shortcomings."
After days of chaos, Hungary opened its borders with Austria over the weekend, allowing thousands of refugees and migrants to travel westward.
Iran is a major patron of Syrian President Bashar Assad, whose forces have been responsible for much of the violence that has driven more than 4 million Syrians to flee the country.
Want to enjoy 'Zen' reading - with no ads and just the article? Subscribe todaySubscribe now