SAN FRANCISCO — Crowds lined up in San Francisco on Wednesday to see — and smell — the blooming of an endangered tropical flower that releases a pungent odor when it opens once every several years.

An Amorphophallus titanum, also known as a corpse flower, began blooming Tuesday afternoon at the California Academy of Sciences, a research institution and museum.

The plant blooms for one to three days once every seven to 10 years. During the bloom, it releases a powerful smell described by some as rotting food or sweaty socks.

''It's kind of imitating the smell of kind of a dead carcass to kind of get all the flies to come and interact with it, pick up pollen, and then take that pollen to another flower that it might investigate due to its smell,'' said Lauren Greig, a horticulturist, California Academy of Sciences.

It was the first bloom for the corpse flower named Mirage, which was donated to the California Academy of Sciences in 2017. It's been housed in the museum's rainforest exhibit since 2020.

The Amorphophallus titanum is native to the Indonesian island of Sumatra. It is listed as endangered by the International Union for Conservation of Nature, with only less than 1,000 individual plants left in the wild.