The National Prosecuting Authority has said undocumented foreign nationals cannot use the asylum system as a last-minute escape from immigration detention after being caught in the country illegally.

Arguing in the Johannesburg High Court, NPA counsel William Mokhari described the situation as a game of “Catch me if you can”.

ALSO READ: March and March warns against allowing asylum system to become a ‘Get-Out-of-Jail Card’

The case involves 33 foreign nationals who only expressed an intention to seek asylum after their arrest.

The legal challenge follows a July constitutional court ruling which struck down home affairs requirements that had to be met before a person could apply for asylum.

The NPA argues undocumented foreign nationals cannot simply cry asylum when caught and expect to walk free.

It said there is no judgment that entitles people who entered South Africa illegally to automatic release after expressing an intention to seek asylum.

The NPA’s William Mokhare said the law requires authorities to assist them with their applications but does not necessarily prevent their detention while they are waiting to formally apply.

"Here we are not dealing with people who are presenting themselves at the port of entry. We're dealing with people who have entered through other means illegally, and they are caught. We're dealing with catch me if you can. If you catch me, I apply for asylum," said Mokhare.

Mokhare said the 48-hour rule must still be observed, with any further detention requiring authorisation from a magistrate.

The NPA said this approach is consistent with international refugee law, including article 31 of the 1951 refugee convention, which protects genuine refugees from penalties for illegal entry under certain conditions.

Never miss a major story. Get breaking news and the latest developments from South Africa and beyond as they happen.