Heckler & Koch MR556 / MR762 Detent Spring.
The detent spring is housed in the receiver and applies tension to the rear takedown pin, keeping it in place and preventing it from falling out.