The corpus luteum is a temporary endocrine structure that forms within the ovary after the release of an egg (ovulation) from the ovarian follicle.