Drill stem safety valve:
A special valve installed below the kelly.Usually, the valve is open so that drilling fluid can flow out of the kelly and down the drill stem.
It can, however, be manually closed with a special wrench when necessary.
In one case, the valve is closed and broken out, still attached to the kelly to prevent drilling mud in the kelly from draining onto the rig floor.
In another case, when kick pressure inside the drill stem exists, the drill stem safety valve is close to prevent the pressure from escaping up the drill stem.