A German court ordered Wednesday the release of the Thai crown prince\'s impounded jet upon receipt of a hefty bank guarantee, allowing an awkward episode that threatened to upset ties to end. Maha Vajiralongkorn\'s Boeing 737 had been seized at Munich airport in southern Germany last Tuesday in a long-running commercial dispute between Thailand and a now-insolvent German construction firm. But a court in nearby Landshut said it had received an assurance under oath from the Thai Department of Civil Aviation\'s director that the plane belonged to the prince, not the Thai state, as well as a 2007 registration certificate. The vice president of the court, Christoph Fellner, said however that since these documents provided only a \"presumption of ownership,\" 20 million euros ($28.2 million) had to be deposited in the form of a bank guarantee. \"No guarantee means no take-off,\" he said. \"If everything goes well for the prince and we establish that the aircraft really belongs to him, than he will get his bank guarantee back.\" The guarantee was set at that level because that was estimated to be the value of the plane, which the prince is said to often pilot himself, the court said. The seizure of the aircraft prompted a visit by Thai Foreign Minister Kasit Piromya on Friday to Berlin, calling the incident a \"huge mistake\" and meeting a senior German foreign ministry official to press for the plane\'s release. \"If this takes too long it might affect the feelings of Thai people towards German people and the country because this is related to the monarchy,\" Kasit had warned, saying the dispute had \"nothing to do\" with the royal. The German government had said it regretted the incident but stressed that it was powerless to act, insisting it was a matter for the courts. The dispute goes back more than 20 years to the involvement of DYWIDAG, which merged with construction firm Walter Bau in 2001, in building a motorway link between Bangkok and Don Muang airport. After \"numerous breaches of contract by the Thai government\", Walter Bau, by then insolvent, in 2007 claimed for damages. \"We have been trying for years ... to have our justified demands for more than 30 million euros met, and this drastic measure is basically the last resort,\" Walter Bau\'s insolvency administrator said when the plane was seized. \"The Thai government keeps playing for time and has not reacted to Schneider\'s demands. Even the involvement of the relevant departments of the German government proved fruitless.\" Contacted by AFP on Tuesday, the insolvency administrator, Werner Schneider, was not immediately available for comment. The Bild am Sonntag tabloid reported on Sunday that the prince had taken measures to prevent his Mercedes also being impounded, parking it at a luxury Munich hotel where it was being watched over by 10 bodyguards.