Electromagnet for generation of magnetic field for an NMR measurement, the electromagnet comprising a frame having an interior volume, and a conductor wiring wound around the frame - at least two circular grooves being provided within a body of the frame, each groove having a rectangular cross section with two walls parallel to the each other and perpendicular to a longitudinal axis of the frame, one of the said walls separating said two circular grooves, characterized in that - each groove accommodates one wire stack, each of said wire stacks comprising a first and a second substack (7a, 7b) which are axially adjacent to one another and wound in opposite directions with the conductor wire having a rectangular cross section; and - jump wiring interconnects in an axial direction the wire stacks by connecting a connection tongue of each of the substacks (7a, 7b) of a wire stack with a corresponding connection tongue of a next but one substack of an adjacent wire stack, in that a connection tongue of the first substack of the first wire stack is conneted with the connection tongue of the first substack of the adjacent wire stack and a connection tongue of the second substack of the first wire stack is connected with a connection tongue of the second substack of the adjacent wire stack, as seen in the axial direction; - a wire current in each jump wire being equal in magnitude but opposite in direction to the current of a return current wire extending axially, so that in view of the connection of said substacks the sum of the axial directional currents flowing through the jump wiring and the return current path, averaged over the axial direction, is zero, to minimize the contribution of the jump wires to the magnetic field at the sample volume. - at least two circular grooves being provided within a body of the frame, each groove having a rectangular cross section with two walls parallel to the each other and perpendicular to a longitudinal axis of the frame, one of the said walls separating said two circular grooves, characterized in that - each groove accommodates one wire stack, each of said wire stacks comprising a first and a second substack (7a, 7b) which are axially adjacent to one another and wound in opposite directions with the conductor wire having a rectangular cross section; and - jump wiring interconnects in an axial direction the wire stacks by connecting a connection tongue of each of the substacks (7a, 7b) of a wire stack with a corresponding connection tongue of a next but one substack of an adjacent wire stack, in that a connection tongue of the first substack of the first wire stack is conneted with the connection tongue of the first substack of the adjacent wire stack and a connection tongue of the second substack of the first wire stack is connected with a connection tongue of the second substack of the adjacent wire stack, as seen in the axial direction; - a wire current in each jump wire being equal in magnitude but opposite in direction to the current of a return current wire extending axially, so that in view of the connection of said substacks the sum of the axial directional currents flowing through the jump wiring and the return current path, averaged over the axial direction, is zero, to minimize the contribution of the jump wires to the magnetic field at the sample volume.