The present invention relates to a needle assembly (1) comprising: a needle hub (4) having a needle (5) with a distal tip (6), a ring (42) for protecting the needle in one of a storage condition or end-of-use condition of the needle assembly, - foldable means (40) for moving the protective ring, - biasing means (30) for urging the foldable means from their folded configuration to their unfolded configuration, - retaining means for maintaining the biasing means in an intermediate stressed state at least in the storage condition of the needle assembly, - deactivating means (47a) for releasing said retaining means at least at the end of the injection step. The invention also relates to an injection device (3) comprising such a needle assembly and a container (2).