BUDAPEST - Hungary's evacuation flights from Afghanistan are nearing an end after the central European country airlifted more than 500 people from Kabul, Foreign Minister Peter Szijjarto said on Wednesday.

Western nations were rushing to complete the evacuation of thousands of people from Afghanistan on Wednesday as the Aug. 31 deadline for the withdrawal of foreign troops draws near, with no sign that the country's new Taliban rulers might allow an extension.

"The exact timing (of when our evacuation ends) will be announced by the commander of the army, which may happen as soon as today," Szijjarto told a news conference, adding that most evacuees were Afghan nationals who had supported a Hungarian charity or Hungarian troops there.

Szijjarto made the remarks after a plane carrying 240 Afghan nationals including 126 children landed in the Hungarian capital Budapest on Wednesday. It was not clear if there were other nationals on the plane as well. Szijjarto did not provide further details.

Hungary, a tough opponent of irregular migration to Europe, reiterated that it rejected any plans to accommodate large numbers of Afghan refugees, and would only evacuate people whose lives were at risk for supporting the NATO presence in Afghanistan.

Another plane that arrived in Budapest on Monday evacuated 173 people from Afghanistan, including many at the request of the United States and Austria.

(Reporting by Anita Komuves and Gergely Szakacs; Editing by Nick Macfie) ((gergely.szakacs@reuters.com ; https://twitter.com/szakacsg ; +36 1 882 3606 ; https://www.reuters.com/journalists/gergely-szakacs))