North Korea announced Tuesday that it intended to conduct its first nuclear test , prompting warnings from Tokyo to Washington that an underground explosion would lead to a sharp response and could undermine the security balance in Asia .