CAIRO, Jan 21 (Reuters) - Journalist Abdelnasser Salama had high hopes for press freedom when Egyptians took to the streets and ended the 30-year rule of president Hosni Mubarak.

Three years later, he has scaled the peak of his profession, with promotion to editor-in-chief of Egypt's best known paper state-run Al-Ahram, and fallen sharply back down to earth by being relegated to the rank of reporter.

He says the demotion was partly a punishment for running hard-hitting stories criticising authorities; a source at a government-appointed press council said he was poor at dealing with staff and there were complaints of bias.

Salama's rise and fall sheds light on the relationship between the state and the press in a country that has lurched from Mubarak's authoritarian rule to a turbulent Islamist administration and then back again to a government backed by the army.

"After Jan. 25 we had hoped there would be change in everything, not just the press," Salama told Reuters, referring to the 2011 uprising against Mubarak, whose anniversary falls on Saturday.

"We had hoped for social justice. It hasn't been realised yet. Press freedom hasn't been realised yet until now."

Through three decades of state-controlled journalism under Mubarak, reporters and editors grew used to the fact that the government would dictate what appeared in the media.

According to Salama, that pressure to toe the government line remained constant under both the leaders who succeeded Mubarak: Islamist President Mohamed Mursi, elected in June 2012, and the interim government backed by army chief General Abdel Fattah al-Sisi, who toppled Mursi last July after mass protests.

Salama's successor who started as editor-in-chief this month had also preceded him in 2012 under the rule of the Supreme Council of the Armed Forces. One of his first actions back in office was to write an editorial saying Al-Ahram was "on the doorstep of a new patriotic period" and won't enter any "unnecessary useless controversy."

STATE APPOINTMENT

Salama says his disenchantment with the "new" Egypt began after he was named head of Al-Ahram - a decision determined by bodies appointed by the state - under Mursi in August 2012.

"We had problems with the ruling regime, the regime of Mursi... They wanted Al-Ahram to be like it was before Jan. 25, which just reports statements from the presidency," he said.

Under the interim government, he said, the challenges did not end. Government officials pressed him and his staff to paint a glowing picture of interim president Adly Mansour on the front page, he said, and complained when the leader was pushed onto the inside pages.

They were not the only unhappy ones. In August 2013, then U.S. ambassador to Egypt Anne Patterson wrote an open letter to Salama condemning an "outrageous, fictitious, and thoroughly unprofessional headline article" that appeared in Al-Ahram.

"Your article's claim that I personally am involved in a conspiracy to divide and destabilize Egypt is absolutely absurd and dangerous," she said.

Salama also repeatedly stressed there was a 'red line' when it came to criticism of Egypt's armed forces.

"We criticised the behaviour of the army in one area or another, or the behaviour of the police in one area or another," said the former editor, who has filed a legal challenge against his dismissal.

"But we were aware in editorial meetings that the army in Egypt is a red line that is not possible to be crossed."

A source at the presidency denied Salama's allegation of official interference in editorial policy.

A court last month decided to cancel Salama's appointment due to irregularities concerning his salary and other administrative reasons, Al-Ahram reported at the time.

A member of the state-appointed Supreme Council for the Press, who asked not to be named, painted another version of the editor's behaviour and the reason for his demotion. Salama had caused internal problems in Al-Ahram and had poor relations with the staff, who said he was a Brotherhood sympathiser.

"So he was changed," he said.

The source said there was no pressure on newspapers from the state and Salama's removal had nothing to do with his stories.

SELF-CENSORSHIP

Under the army-backed government, the media, which praised Mubarak on the front page on an almost daily basis, has gone into overdrive again for the state, lionising security forces and depicting the Brotherhood as terrorists.

Salama acknowledges the Egyptian press has been guilty of self-censorship, another sign of its stumbling political transition. He says one of the bloodiest days in the country's modern history was a prime example of this.

On Aug. 14, riot police backed by snipers and bulldozers crushed a big pro-Mursi protest camp at Rabaa al-Adawiya in the capital. Hundreds of people were killed. Corpses in white sheets filled mosques and Cairo's morgue.

"There was no one in the newspapers who showed pictures of the dead, or visited relatives of victims," said Salama.

"There wasn't anyone in newspapers with the other point of view. Everyone dealt with Rabaa as official business."

Asked to comment on his political affiliations, Salama said: "I look at the interest of the homeland, whoever is the ruler."

The former editor predicts others who fail to satisfy the authorities will also be dismissed: "Suffice it to say that the sword of sacking is being brandished." (Writing by Michael Georgy; Editing by Mark Trevelyan)