A 25-year-old Japanese photographer placed under police custody last week after traveling to the Indonesian province of Aceh without a permit has been released and departed for Singapore, officials said Sunday.

According to the Japanese Embassy in Jakarta, Tadatomo Takagi was expelled from Indonesia following his release.

Takagi was detained by the Indonesian military on Thursday night. Brig. Gen. Bambang Dharmono, military operational commander in Aceh, told reporters in the North Aceh Regency capital of Lhokseumawe that Takagi arrived in the town Wednesday but did not have a permit from the Foreign Ministry to travel to Aceh.

A permit is required for foreign journalists under the terms of martial law, which was imposed in the province May 19.

The brigadier general asked Takagi to obtain the permit before starting work in Aceh.

Despite the warning, Takagi entered the neighboring district of Bireuen, where he was stopped Thursday evening by military police and found to have camera film in his bag.

Takagi said he was in Aceh to take pictures for a photo exhibition in Tokyo, according to Bambang.

A presidential decree issued earlier this month required all foreign journalists covering Aceh to obtain permits from the ministry and report their presence to the military emergency authorities.