A fluid pressure cylinder (2,2A) comprising a main cylinder body having a cylinder bore is formed, a piston member (4,4A) having a piston portion that is movably received in the cylinder bore and an output rod extending from the piston portion to an exterior of the main cylinder body, and a fluid pressure operation chamber (12a,12b) that is defined in the cylinder bore, and comprising: a rod insertion hole (20,20A) that is formed at a central portion of a base end portion of the piston member and that opens to the base end, and into which a fluid pressure in the fluid pressure operation chamber is introduced; and an auxiliary rod that is provided on a head side end wall member of the main cylinder body so as to project within the cylinder bore, and that can be inserted into the rod insertion hole; characterised in that the fluid pressure cylinder (2,2A) further comprises: an open/shut valve mechanism for detection that is installed to the auxiliary rod; and a fluid passage that is formed in the main cylinder body and the auxiliary rod, and that is opened and shut by the open/shut valve mechanism; wherein the open/shut valve mechanism comprises: a valve body reception hole that is formed in an top end side portion of the auxiliary rod to be parallel to an axis of the cylinder bore, and that communicates with the rod insertion hole; a valve body that is movably received in the valve body reception hole and that has a recessed engagement portion on an external peripheral portion; and a spherical body that is movably fitted to the auxiliary rod so as to engage with the recessed engagement portion; and, when the piston member reaches a set shifting position that is set in advance, the valve body is changed over to a shut position or to an open position due to cooperation between the spherical body, the recessed engagement portion, and a rod insertion hole inner circumferential wall portion. a rod insertion hole (20,20A) that is formed at a central portion of a base end portion of the piston member and that opens to the base end, and into which a fluid pressure in the fluid pressure operation chamber is introduced; and an auxiliary rod that is provided on a head side end wall member of the main cylinder body so as to project within the cylinder bore, and that can be inserted into the rod insertion hole; characterised in that the fluid pressure cylinder (2,2A) further comprises: an open/shut valve mechanism for detection that is installed to the auxiliary rod; and a fluid passage that is formed in the main cylinder body and the auxiliary rod, and that is opened and shut by the open/shut valve mechanism; an open/shut valve mechanism for detection that is installed to the auxiliary rod; and a fluid passage that is formed in the main cylinder body and the auxiliary rod, and that is opened and shut by the open/shut valve mechanism; wherein the open/shut valve mechanism comprises: a valve body reception hole that is formed in an top end side portion of the auxiliary rod to be parallel to an axis of the cylinder bore, and that communicates with the rod insertion hole; a valve body that is movably received in the valve body reception hole and that has a recessed engagement portion on an external peripheral portion; and a spherical body that is movably fitted to the auxiliary rod so as to engage with the recessed engagement portion; a valve body reception hole that is formed in an top end side portion of the auxiliary rod to be parallel to an axis of the cylinder bore, and that communicates with the rod insertion hole; a valve body that is movably received in the valve body reception hole and that has a recessed engagement portion on an external peripheral portion; and a spherical body that is movably fitted to the auxiliary rod so as to engage with the recessed engagement portion; and, when the piston member reaches a set shifting position that is set in advance, the valve body is changed over to a shut position or to an open position due to cooperation between the spherical body, the recessed engagement portion, and a rod insertion hole inner circumferential wall portion.