A New Zealand journalist detained in Egypt has been released after several hours in custody.

Campbell MacDiarmid, the deputy managing editor at Egypt's Business Today magazine, and British freelance journalist Adam Ramsey were detained in the capital of Cairo while covering a rally on Sunday.

Thousands of military supporters marched on Sunday to celebrate the anniversary of the 1973 Arab-Israeli war, but the rallies turned violent, killing 44 people and injuring more than 240, AFP reports.

Friends and colleagues tweeted that MacDiarmid and Ramsey were taken into custody by police about 3am (AEDT) on Monday and were being held at a police station in nearby Dokki.

MacDiarmid tweeted shortly after 6.30am (AEDT) to say he was out of custody.

"Home safe. No phone. Sorry for causing worry," he said.

Asked if he had been arrested, MacDiarmid responded "they call it detained here".

A spokeswoman for the New Zealand Ministry of Foreign Affairs and Trade confirmed MacDiarmid was not arrested.

The NZ embassy in Cairo had received confirmation MacDiarmid was safe and well, she said.

However, it was not clear if Ramsey had been released.

His Twitter feed remained silent and MacDiarmid said he had not seen the Briton at the police station.

The New Zealander's arrest comes five weeks after another Kiwi journalist, Wayne Hay, was arrested alongside three other Al-Jazeera workers in Cairo while covering a protest.

The group was held for five days before being released on September 1.