CAIRO (AP) — An Egyptian military court released an award-winning journalist Saturday after giving him a six-month suspended sentence for endangering national security by spreading false information in his coverage of operations against Islamic militants in the Sinai Peninsula, a security official and a lawyer said.

Ahmed Abu-Draa’s lawyer called the lighter sentence an attempt to defuse criticism over the 38-year-old journalist’s detention while still serving as a warning against challenging the military.

Political tensions have risen sharply ahead of mass rallies planned Sunday to honor the military and rival protests by supporters of ousted Islamist President Mohammed Morsi, a combination many fear will lead to a new round of unrest.

Already, there has been an uptick in violence ahead of the 40th anniversary of the Egyptian army’s Oct. 6 crossing of the Suez Canal during the 1973 war with Israel. The war is celebrated for Egypt’s initial battlefield victories over Israel, and is a national holiday traditionally celebrated with military parades, airshows and pro-military rallies.

The military-backed interim government is going forward with the celebrations, including performances planned in Cairo’s Tahrir Square, the symbol of the Egyptians’ uprisings against authorities since mass protests held there led to the downfall of autocrat Hosni Mubarak in 2011.

In a show of defiance, pro-Morsi supporters have also vowed to enter the central plaza, even though attempts to do so earlier this week were dispersed after riot police fired tear gas as clashes nationwide left four dead.

Pro-Morsi protesters, led by the Muslim Brotherhood, have been denied access to the iconic square and have faced a withering crackdown since the Islamist leader was toppled in a popularly backed military coup on July 3.

“Tahrir Square is not exclusive to those who support the coup,” said Islam Tawfiq, a member of the Brotherhood’s youth group. “We will enter it, God willing.”

On Saturday, police fired tear gas to disperse dozens of Islamists rallying near Rabaah al-Adawiya, a square in eastern Cairo that was the site of a pro-Morsi sit-in that was violently razed by security agencies on Aug. 14, leaving hundreds dead.

Security has been beefed up around Cairo, with police and army vehicles deployed in strategic junctures on the eve of the celebrations in an attempt to prevent clashes between rival protests. The Interior Ministry, in charge of the police, warned in a statement that it would deal “firmly” with any attempts to “foil” the celebratory mood on Sunday.

Egypt’s interim President Adly Mansour, in a nationally televised speech Saturday, urged people to take to the streets to celebrate the October anniversary and “support your army.”

In a strongly worded statement, the presidential spokesman Ahmed el-Musalamani said those protesting the military on a national holiday “are carrying out the work of agents, not activists.”

The case against Ahmed Abu-Draa, who was arrested on Sept. 4, has drawn outrage from fellow journalists and rights groups accusing the army of undermining freedom of expression and continuing to refer civilians to military tribunals, despite a campaign to stop the practice.

Colleagues said Abu-Draa’s trial was an attempt to silence independent reporting from the flashpoint area, which sits on the border with Israel and the Gaza Strip. Few journalists have direct access to what is happening in Sinai because of security concerns, forcing many to rely on statement by officials.

Abu-Draa, who lives in Sinai and works as a freelancer for multiple Egyptian and foreign newspapers and television channels, had disputed the military’s claims that no civilians were hit in an intensified operation against rising militant attacks in the Sinai. The military said it was only targeting homes of militants and tunnels used for smuggling goods to Gaza, but the journalist reported that civilian homes were hit and a mosque was damaged.

Abu-Draa told The Associated Press in a telephone interview after his release that he intends to return home to pursue his work, but noted the suspension runs for three years, meaning that if he commits another offense in this period, he would be punished for both

“This verdict is in itself a warning. If I do anything again, this sentence will be revived,” he said, speaking from Ismailia, a Suez Canal city where he was held.

His lawyer Negad el-Borai said Abu-Draa had been held in solitary confinement in a military prison. “There is no case. He should have been set free,” el-Borai said.

In addition to the suspended sentence, the journalist was fined $30 for entering a military zone without a permit. The court dropped charges of broadcasting news that undermine Egypt’s reputation abroad, and filming strategic areas without a permit, according to el-Borai.

A security official said an intelligence report presented to the court had stated that Abu-Draa had acted with “good intentions.” The official spoke on condition of anonymity because he was not authorized to speak to the media

An Egyptian photojournalist, Mohammed Sabry, has been facing a military tribunal since January for filming military installations in the Sinai. He has been released pending his trial.