An intramedullary pin (1) is provided. The intramedullary pin has a self-locking distal end that can be used for treating metadiaphyseal fractures of long bones such as the humerus. Locking of the distal end of the intramedullary pin (1) can take place in a controlled and gradual, and also reversible, manner. The structure of the intramedullary pin (1) further allows the use of a guide wire, whereby the pin can be inserted into the fractured bone with the aid of a guide wire.