The family of a Saudi woman student who died of heart problems has said her university prevented medics from getting to her in time because of rules barring men from the women-only part of the campus, Saudi media reported.

The King Saud University in Riyadh denied the accusation and said Amena Bawazir, who had a history of heart disease, received quick medical attention after suffering a stroke last Sunday, causing her heart and lungs to stop working.

The case has revived memories of a 2002 incident in which 15 schoolgirls in Jeddah died in a fire after the Saudi morality police sent them back into the building because they were not veiled.

Al-Arabiya television's news website quoted Amena's sister, Fahda Bawazir, as saying that medics arrived at a campus gate shortly after her sister fell ill at around 11am.

"But the medics were not allowed to enter the campus until 1pm," she said.

She added that university authorities kept them outside until a gate was secured in a way "that did not allow the [male] medics and females in the building to mix".