Police have detained three men for allegedly joining the group loyal to the Sulu sultanate with the goal of secession of Sabah from Malaysia.