TOKYO (AP) — A law set to pass Friday by Japan’s parliament could doom its 1,500-year-old hereditary institution by insisting that only men can be emperor, sparking worry about the shrinking, fast-aging imperial family.

Emperor Naruhito ’s 24-year-old daughter is hugely popular, and many Japanese want her to be his successor, but Princess Aiko is ineligible because she is a woman. Japan’s male-only succession rule means the line must move to the emperor’s younger brother, then to his 19-year-old nephew Prince Hisahito. Next in line after him is the emperor’s 90-year-old uncle.