The Sri Lankan court on Saturday freed the four Maldivian students who were arrested.
According to an official of the Maldivian Embassy in Sri Lanka, the families of the four were notified to pick them up.
Local media Mihaaru reports that the four students were released as the Sri Lankan state was not levying any criminal charges against them.
They were detained after the police found drugs and an unlicensed air gun in their house.
The police also arrested two other Maldivian individuals upon discovering a book containing information on the Islamic State (IS) in their residence. The court has decided to remand them for 13 days.
The IS recently claimed responsibility for the string of bomb blasts across Sri Lanka, which killed over 200 people and injured 500 others last Sunday. The authorities have since launched a mass crackdown to inspect residences across the country.
Maldives' Ministry of Foreign Affairs has called on all Maldivians residing in Sri Lanka to abide by the instructions of the authorities and to fully cooperate with their operations. The ministry also urged them to contact the Maldivian embassy for consular services.