A gear pump or a gear motor comprising: a main pump or a main motor which is connected to a drive source; and an auxiliary pump or an auxiliary motor which is connected in series to the main pump or the main motor, the main pump or the main motor being positioned between the drive source and the auxiliary pump or the auxiliary motor, the main pump or the main motor including: a main drive gear and a main driven gear each of which is a helical gear; and a main drive shaft which extends toward the auxiliary pump or the auxiliary motor from an end face of the main drive gear, the end face opposing the auxiliary pump or the auxiliary motor, and a main connection part being formed at a leading end surface of the main drive shaft, the auxiliary pump or the auxiliary motor including an auxiliary drive shaft which extends toward the main drive shaft, an auxiliary connection part being formed at a leading end face of the auxiliary drive shaft, wherein, the gear pump or the gear motor further comprises: a connecting member which connects the main connection part with the auxiliary connection part and is in contact with an outer edge portion of the leading end face of the main drive shaft; and a space which opposes a receiving surface of the connecting member, the receiving surface opposing the auxiliary pump or the auxiliary motor, wherein, when high-pressure operating fluid is supplied to the space, the connecting member presses the main drive shaft toward the drive source. a main pump or a main motor which is connected to a drive source; and an auxiliary pump or an auxiliary motor which is connected in series to the main pump or the main motor, the main pump or the main motor being positioned between the drive source and the auxiliary pump or the auxiliary motor, the main pump or the main motor including: a main drive gear and a main driven gear each of which is a helical gear; and a main drive shaft which extends toward the auxiliary pump or the auxiliary motor from an end face of the main drive gear, the end face opposing the auxiliary pump or the auxiliary motor, and a main connection part being formed at a leading end surface of the main drive shaft, the auxiliary pump or the auxiliary motor including an auxiliary drive shaft which extends toward the main drive shaft, an auxiliary connection part being formed at a leading end face of the auxiliary drive shaft, wherein, the gear pump or the gear motor further comprises: a connecting member which connects the main connection part with the auxiliary connection part and is in contact with an outer edge portion of the leading end face of the main drive shaft; and a space which opposes a receiving surface of the connecting member, the receiving surface opposing the auxiliary pump or the auxiliary motor, wherein, when high-pressure operating fluid is supplied to the space, the connecting member presses the main drive shaft toward the drive source. a connecting member which connects the main connection part with the auxiliary connection part and is in contact with an outer edge portion of the leading end face of the main drive shaft; and a space which opposes a receiving surface of the connecting member, the receiving surface opposing the auxiliary pump or the auxiliary motor, wherein, when high-pressure operating fluid is supplied to the space, the connecting member presses the main drive shaft toward the drive source.