BANGKOK (AP) — A plane carrying WikiLeaks founder Julian Assange has landed in Thailand.

He is on his way to enter a plea in a U.S. court that is expected to free him and resolve the legal case over the site’s publication of classified documents.

The chartered plane landed at a Bangkok airport Tuesday afternoon for refueling.

Assange is scheduled to appear in court Wednesday in the Northern Mariana Islands, a U.S. commonwealth.

A U.S. Justice Department filing says he is expected to plead guilty to an Espionage Act charge of conspiring to unlawfully obtain and disseminate classified information.

The plea requires a judge’s approval, but Assange is expected to return to his home country of Australia afterward.