A religious affairs adviser for the government in Punjab province says the men were finally released today after they promised not to take part in militant activities .