CAIRO — Militants carried out a devastating ambush on a convoy of Egyptian police and security officials deep inside the western desert late Friday in the deadliest such attack in years, security officials said on Saturday.

At least 59 Egyptian police officers and security officials were killed, security officials said. In a statement issued later, the Interior Ministry put the casualties much lower — 16 officers killed and 13 wounded — but did not immediately explain the discrepancy. Its statement also claimed that the police had killed or wounded about 15 militants.

At least eight police vehicles were hit while driving toward what was believed to be a militant hide-out, about 85 miles from Cairo, following an intelligence tip. Militants who were lying in wait raked the convoy with gunfire and rockets from higher ground, police officials said.

An initial claim of responsibility by Hasm, a small Islamist group that emerged last year, was discounted by militancy experts who questioned its authenticity. There was no other claim.