A connector for a medical container comprises a connector element to be attached to the medical container for providing a port to the medical container. The connector element comprises a head section and a pinch-off section adjoining the head section. The head section comprises an opening and the pinch-off section encloses an inner lumen being in fluid connection with the opening of the head section for proving a fluid path through the connector element. The pinch-off section is flexibly deformable for pinching off the fluid path. A closure element is attachable to the head section for closing the opening of the head section, and a pierceable membrane element is held between the head section of the connector element and the closure element. A deflection element extends from the head section towards the inner lumen for deflecting a needle of a delivery device when piercing the membrane element.