CAIRO — A military court on Saturday convicted an Egyptian journalist of entering a military zone without authorization and sentenced him to six months in prison, but deferred his sentence indefinitely, a mixed decision in a closely watched test of news media freedom under the new government.

The reporter, Ahmed Abu Deraa, is one of the few well-known journalists covering the lawless Sinai region, where the Egyptian Army is battling militants angry at the military ouster of President Mohamed Morsi of the Muslim Brotherhood. A military prosecutor accused Mr. Abu Deraa of publishing reports that contradicted army statements, in particular an account of civilian casualties from military strikes. He was arrested on Sept. 4 and has been detained since.

The military has restricted journalists’ access to the areas of Sinai where it is conducting operations, making it difficult for journalists to independently confirm the military’s statements about its operations or assess what the military describes as a hard-line Islamist insurgency there. Mr. Abu Deraa, who works for an Egyptian newspaper and a satellite network, was fined a small amount for his report contradicting the military — the charge was spreading false information about the military — and he received the suspended six-month sentence for entering a military zone without authorization.

Alarmed that Mr. Abu Deraa was facing imprisonment for his reporting, the Egyptian journalists’ syndicate in Cairo held rallies and protests in his defense, and the case received extensive coverage in the Egyptian and international news media. But at a news conference, a military spokesman defended both the substance of the charges and the suitability of a military trial.