An upper slewing body mountable on a lower traveling body of a construction machine, the upper slewing body comprising: an upper frame mountable on the lower traveling body so as to be able to be slewed around a slewing axis; an engine mounted in the upper frame at a position rearward of the slewing axis in a frame front-rear direction that is a front-rear direction of the upper frame; a hydraulic pump coupled to one of opposite end portions of the engine in a frame lateral direction to be driven by the engine, the frame lateral direction being a lateral direction of the upper frame; a control valve mounted on the upper frame at a position rearward of the slewing axis and forward of the engine in the frame front-rear direction; a hydraulic pipe interconnecting the hydraulic pump and the control valve; and a rear tank mounted on the upper frame at a position between the engine and the control valve with respect to the frame front-rear direction, wherein: the control valve has an inner end portion and an outer end portion which are two opposite end portions in the frame lateral direction, the inner end portion being closer to the slewing axis than the outer end portion; the control valve is disposed so as to locate the outer end portion on the same side as the hydraulic pump, relative to the slewing axis, in the frame lateral direction; the control valve is mounted on the upper frame obliquely to the frame lateral direction so as to locate the outer end portion rearward of the inner end portion in the frame front-rear direction; the hydraulic pipe connects the hydraulic pump to a connection portion of the control valve; and the rear tank includes an overlap portion overlapping the control valve as viewed in the frame front-rear direction, characterized in that the connection portion of the control valve is closer to the outer end portion than the inner end portion, and the overlap portion includes a rear opposition side surface oblique to the frame lateral direction in the same direction as a direction in which a rear side surface of the control valve is oblique, the rear opposition side surface being opposed to the rear side surface. an upper frame mountable on the lower traveling body so as to be able to be slewed around a slewing axis; an engine mounted in the upper frame at a position rearward of the slewing axis in a frame front-rear direction that is a front-rear direction of the upper frame; a hydraulic pump coupled to one of opposite end portions of the engine in a frame lateral direction to be driven by the engine, the frame lateral direction being a lateral direction of the upper frame; a control valve mounted on the upper frame at a position rearward of the slewing axis and forward of the engine in the frame front-rear direction; a hydraulic pipe interconnecting the hydraulic pump and the control valve; and a rear tank mounted on the upper frame at a position between the engine and the control valve with respect to the frame front-rear direction, wherein: the control valve has an inner end portion and an outer end portion which are two opposite end portions in the frame lateral direction, the inner end portion being closer to the slewing axis than the outer end portion; the control valve is disposed so as to locate the outer end portion on the same side as the hydraulic pump, relative to the slewing axis, in the frame lateral direction; the control valve is mounted on the upper frame obliquely to the frame lateral direction so as to locate the outer end portion rearward of the inner end portion in the frame front-rear direction; the hydraulic pipe connects the hydraulic pump to a connection portion of the control valve; and the rear tank includes an overlap portion overlapping the control valve as viewed in the frame front-rear direction, characterized in that the connection portion of the control valve is closer to the outer end portion than the inner end portion, and the overlap portion includes a rear opposition side surface oblique to the frame lateral direction in the same direction as a direction in which a rear side surface of the control valve is oblique, the rear opposition side surface being opposed to the rear side surface. the control valve has an inner end portion and an outer end portion which are two opposite end portions in the frame lateral direction, the inner end portion being closer to the slewing axis than the outer end portion; the control valve is disposed so as to locate the outer end portion on the same side as the hydraulic pump, relative to the slewing axis, in the frame lateral direction; the control valve is mounted on the upper frame obliquely to the frame lateral direction so as to locate the outer end portion rearward of the inner end portion in the frame front-rear direction; the hydraulic pipe connects the hydraulic pump to a connection portion of the control valve; and the rear tank includes an overlap portion overlapping the control valve as viewed in the frame front-rear direction, characterized in that the connection portion of the control valve is closer to the outer end portion than the inner end portion, and the overlap portion includes a rear opposition side surface oblique to the frame lateral direction in the same direction as a direction in which a rear side surface of the control valve is oblique, the rear opposition side surface being opposed to the rear side surface.