Groups with commuting inner mappings are of nilpotency class at most 2, but there exist loops with commuting inner mappings and of nilpotency class higher than 2, called loops of Csörgő type. The paper describes a general construction of such loops that is based on cocycle-like systems defined on 2-groups.