To restrain the increase of the thickness of an air cylinder in the axial direction as far as possible by incorporating a permanent magnet between the piston of the air cylinder and the end cover.
A end cover 2 made of a magnetic substance is fitted to a cylinder body 3 by means of C-shaped retaining ring 6. A permanent magnet 4 is fixed to a piston 1. When the piston 1 reaches its upper end by an air pressure, the end cover 2 attracts the permanent magnet 4, and even if the air pressure is removed, the piston 1 and the movable part fitted to a piston rod 5 is retained to the upper end position thereof against gravity. Further, it is similar when the permanent magnet 4 is fixed to the end cover 2, and the piston 1 is made of a magnetic substance. As a result, the conventional thin type air cylinder can be provided with a drop preventive function with the thickness in the axial direction unchanged, and further a small-size, inexpensive device can be enabled.