The story takes place at the castellated abbey of the "happy and dauntless and sagacious" Prince Prospero. Prospero and 1,000 other nobles have taken refuge in this walled abbey to escape the Red Death, a terrible plague with gruesome symptoms that has swept over the land. Victims are overcome by "sharp pains", "sudden dizziness", and hematidrosis, and die within half an hour. Prospero and his court are indifferent to the sufferings of the population at large; they intend to await the end of the plague in luxury and safety behind the walls of their secure refuge, having welded the doors shut.
One night, Prospero holds a masquerade ball to entertain his guests in seven colored rooms of the abbey. Each of the first six rooms is decorated and illuminated in a specific color: blue, purple, green, orange, white, and violet. The last room is decorated in black and is illuminated by a scarlet light, "a deep blood color" cast from its stained glass windows. Because of this chilling pairing of colors, very few guests are brave enough to venture into the seventh room. A large ebony clock stands in this room and ominously chimes each hour, upon which everyone stops talking or dancing and the orchestra stops playing. Once the chiming stops, everyone immediately resumes the masquerade.
At the chiming of midnight, the revelers and Prospero notice a figure in a dark, blood-splattered robe resembling a funeral shroud. The figure's mask resembles the rigid face of a corpse and exhibits the traits of the Red Death. Gravely insulted, Prospero demands to know the identity of the mysterious guest so they can hang him. The guests, too afraid to approach the figure, instead let him pass through the six chambers. The Prince pursues him with a drawn dagger and corners the guest in the seventh room. When the figure turns to face him, the Prince lets out a sharp cry and falls dead. The enraged and terrified revelers surge into the black room and forcibly remove the mask and robe, only to find to their horror that there is nothing underneath. Only then do they realize the figure is the Red Death itself, and all of the guests contract and succumb to the disease. The final line of the story sums up, "And Darkness and Decay and the Red Death held illimitable dominion over all".

Question: Why did the nobles take refuge in the abbey?
Answer: To avoid contracting the Red Death.
Alternative answer: To escape the red death