CAIRO — Gunmen abducted the 12-year-old grandniece of the late Egyptian leader Anwar Sadat but released her nearly 24 hours later for 5 million pounds (about $840,000) in ransom, security officials said Monday.

The girl was kidnapped on her way to school Sunday morning in the upscale Cairo suburb of Heliopolis, the officials said, speaking on condition of anonymity because they were not authorized to speak to the media.

They said the kidnappers were in two cars and drove the girl through three Nile Delta provinces north of the Egyptian capital before they released her on the desert road from Cairo to the Mediterranean city of Alexandria.

The officials said police on Monday arrested six men for their alleged part in the kidnapping.

The schoolgirl was being driven to school in a family car when one of the gunmen intercepted them and forced his way into the girl's vehicle. The kidnappers later beat the driver and forced the girl into one of their cars.

Sadat was assassinated in 1981. The girl's father is Sadat's nephew, businessman Effat Sadat.

Kidnap for ransom is uncommon in Egypt, but the country of some 80 million people is in the grips of a crime wave that followed the ouster of longtime leader Hosni Mubarak in February, with rampant armed robberies and break-ins.

Police disappeared from Cairo and other major cities three days into the 18-day uprising that forced Mubarak to step down on Feb. 11. Their as-yet unexplained withdrawal has created a security vacuum that persists to this day, with just about 50 percent of the police force back to the streets. Several prison breaks during the uprising have unleashed thousands of criminals, including murderers and drug barons, on the streets.