  Long secondary periods (LSPs), observed in a third of pulsating red giant
stars, are the only unexplained type of large-amplitude stellar variability
known at this time. Here we show that this phenomenon is a manifestation of a
substellar or stellar companion orbiting the red giant star. Our investigation
is based on a sample of about 16,000 well-defined LSP variables detected in the
long-term OGLE photometric database of the Milky Way and Magellanic Clouds,
combined with the mid-infrared data extracted from the NEOWISE-R archive. From
this collection, we selected about 700 objects with stable, large-amplitude,
well-sampled infrared light curves and found that about half of them exhibit
secondary eclipses, thus presenting an important piece of evidence that the
physical mechanism responsible for LSPs is binarity. Namely, the LSP light
changes are due to the presence of a dusty cloud orbiting the red giant
together with the companion and obscuring the star once per orbit. The
secondary eclipses, visible only in the infrared wavelength, occur when the
cloud is hidden behind the giant. In this scenario, the low-mass companion is a
former planet that has accreted a significant amount of mass from the envelope
of its host star and grown into a brown dwarf.
