NEW DELHI — In less than 24 hours, Bollywood has lost two legends, back to back.

On Wednesday morning, Irrfan Khan, a beloved actor who broke through to Hollywood and seemed to resonate especially well with fans, died at age 53. Mr. Khan had cancer and was admitted to a hospital in Mumbai for a colon infection last week.

Then, on Thursday morning, India was shocked to learn of the death of Rishi Kapoor. Mr. Kapoor, 67, was a Bollywood giant, a handsome, charming matinee idol who starred in dozens of films in the 1970s and ’80s, and hailed from an illustrious film family.

Mr. Kapoor found out he had leukemia in 2018, and was admitted to a hospital in Mumbai on Wednesday, but an exact cause of death was not immediately given.

“It seems like we’re in the midst of a nightmare,” tweeted Akshay Kumar, one of Bollywood’s most successful actors.