Nine Australians who stripped at the Formula One in Malaysia at the weekend have been charged with public nuisance but are free to leave the country after apologising.
The charge carries a fine but no jail time, and no conviction was recorded.
The men, aged between 25 and 29, have spent four nights in two cells at the Sepang police station, near the race track where they were arrested on Sunday.
The prosecution had considered more serious charges relating to insulting the national emblem but they were not pursued.
The men were also investigated for intentional insult - a charge that carries a minimum fine and a maximum two years in jail.
The men read a letter to the court apologising for their behaviour and expressing remorse.
One of the men, Thomas Whitworth, fainted during the proceeding. The men were then given water and their handcuffs removed.
Evidence before the court included the nine pairs of swimming trunks bearing the Malaysian flag.
'Budgie smuggling' case gained international attention
The group arrived at the Sepang court just after 9am local time (2pm NZT), and were taken to a court cell amid a large media pack.
The father of Jack Walker - one of the men arrested and a staffer of Defence Industry Minister Christopher Pyne - travelled to Malaysia to support his son.
The men stripped down to Malaysian-flag-printed swimwear - or "budgie smugglers" - after Australian Daniel Ricciardo won the Malaysian Grand Prix on Sunday afternoon.
Some of them were also filmed drinking beer from their shoes.
The Australians are Mr Whitworth, 28, Branden Stobbs, 29, Edward Leaney, 25, Nicolas Kelly, 27, Thomas Laslett, 28, James Paver, 27, Adam Pasfield, 25, Timonthy Yates, 29 - the son of a senior diplomat - and Mr Walker, 26.
It was widely thought the men would be deported rather than jailed, as the Malaysian government, led by Prime Minister Najib Razak, has been criticised for introducing laws thought to be draconian and designed to crack down on free speech.