A German court released a Thai prince’s personal plane Wednesday after the government of Thailand agreed to post a bond for the roughly $54 million it owes a defunct German construction company from an international arbitration ruling.

The Boeing 737-400 owned by Prince Maha Vajiralongkorn was seized last month at an airport in Munich as a result of a long-running dispute between a receiver for insolvent Walter Bau, once the third-largest construction company in Germany, and the Thai state.