The agreement will bring an end to a nearly three-decade war between the Free Aceh Movement and the government in Jakarta .