TEL AVIV—Israeli agents covertly extracted documents detailing Iran’s nuclear program in a dramatic 6½-hour operation in Tehran in January, removing a trove of materials that included partial designs for a nuclear warhead, senior Israeli intelligence officials said.

The Israeli team secretly reached the warehouse holding the materials and broke in during a tight time window when it knew the building would be unguarded, the officials said. To avoid drawing attention to the nondescript facility, Iran hadn’t posted full-time...