Former inspector general of police Hasan Mahmud Khandaker has been made the Bangladesh ambassador to Spain.