Thai festivalgoers could face the death penalty if they release sky lanterns too close to airports, the ruling junta has warned.

The crackdown on the annual Loy Krathong event is intended to protect aircraft from wayward lanterns, potentially incurring injury, flight delays and financial loss, local media reported.

The festival – a popular celebration taking place this week across the country – attracts millions of Thais, who head to rivers, canals and other waterways to load small rafts with incense, flowers and candles to “float away” their bad luck.

The celebrations coincide with the end of the rice harvest season and the rainy season, and is a period when locals ask the goddess of water for redemption and forgiveness from all things, including the polluting of waterways.

Setting off the paper lanterns into the night sky is seen as an addendum to bring good luck. But while many regard the illuminations as romantic, previous accidents and injuries caused by misfiring fireworks and wandering lanterns have prompted the authorities to intervene this year.

“Releasing paper lanterns near airports can be very dangerous to the safety of aircraft and it is a criminal offence,” Police Major General Amnuay Nimmano told Reuters. “Those who violate the law will be dealt with accordingly and could face life in prison or the death penalty.”

Some airlines have cancelled flights and others have changed their schedules during the festival. Bangkok has deployed 2,000 police on to the streets and set up checkpoints, with parts of the city banning the sale of fireworks and lanterns, according to the Bangkok Post.

Though Loy Krathong is well-loved by tourists and locals, the prime minister says he has no plans to celebrate the festival, which starts on Wednesday night. Prayuth Chan-ocha, who seized control of the country in a coup in May and who has since launched various “happiness festivals” to boost public morale, says he has no need to float away any sadness because he is perfectly happy.