An image forming apparatus includes an image forming body, a locking unit
blocking movement of at least one movable object of the image forming
body, and a control unit controlling a locking state of the locking unit
and a releasing state of the locking unit. The locking unit includes a
latching member provided on one of the at least one movable object and
provided with a latching depression, a supporting member provided on the
image forming body, and a locking member movably supported by the
supporting member so as to be insertable into and removable from the
latching depression of the latching member.