The editor-in-chief of Turkey's flagship daily newspaper Hurriyet has been dismissed from his role days after the paper published a news article, titled "Unease at the military headquarters".

According to Turkish media reports, the headline angered President Recep Tayyip Erdogan and the Turkish government, leading to the removal of Sedat Ergin, Hurriyet's veteran editor.

Ergin, a journalist and political commentator, was appointed as the editor-in-chief of Hurriyet in August 2014.

Saturday's news story, filed by Hurriyet's Ankara bureau chief Hande Firat, was focusing on how the General Staff, the highest military body in the country, evaluated the criticism and speculation directed at the Turkish armed forces following last year's failed coup attempt.

Firat was the first journalist to put Erdogan on air via FaceTime on the night of the coup attempt , during which she still worked as the Ankara representative of CNN Turk.

Her report also claimed that last week's end to the headscarf ban in the military, military chief Hulusi Akar's foreign visits with Erdogan, and his recent visit to the Kardak Islets in the Aegean Sea - a piece of uninhabitable land that brought Turkey and Greece to the verge of a war in the 1990s - have attracted criticism from certain circles within the military.

Hurriyet, in a statement published on Tuesday, said the report was "based completely on an institutional briefing by the Turkish General Staff".

Erdogan and several Turkish media organisations argued that the choice of language in the headline of the article and claims within the text echoed news reports which preceded military interventions of the past.

"I tell you straight, the [story's] headline showed rudeness, a lack of character," Erdogan told reporters on Tuesday.

READ MORE: Turkey's failed coup attempt - All you need to know

"Neither the newspaper's management nor the staff have the right to write such a headline. Some legal steps have been taken and we will follow this. Because there is no right and no authority to set state institutions against each other," he said.

'Unfounded and ill-intentioned'

After Erdogan's comments, the Turkish military, which did not deny the contents of the article or criticise the choice of headline for four days following its publication on Saturday, issued a statement and said the report was " unfounded and ill-intentioned".

"We regret efforts to blur the agenda with allegations and defamation at a time when the Euphrates Shield operation [in northern Syria] is progressing successfully," the military said on Tuesday. "Suggesting that there are problems between the Turkish armed forces and the government distorts the issue."

Also on Tuesday, which was coincidentally the tenth anniversary of the last successful military intervention in Turkey's history, Deputy Prime Minister Numan Kurtulmus said that armed forces were "working in harmony with the government".

READ MORE: How will the military shake-up affect Turkey's future?

In an obvious reference to Hurriyet's headline, Kurtulmus said: "There is no uneasiness in the military, but it is obvious that some people in Turkey are disturbed by the fact that the Turkish armed forces are working in harmony with the government, which is elected as a result of the nation's will.

"Everyone should mind their own business. The media should mind its own business, bureaucracy, military bureaucracy and government as well," Kurtulmus added.

'We are sorry'

Hurriyet, in a statement published on Tuesday, said it used the expression of "unease" in the story to explain the General Staff's reaction to the claims and criticisms targeting it.

"However, unfortunately, after the story was published, we saw that this expression could be understood as if there was unease in the General Staff against the government," the newspaper said.

"It didn't cross our minds that such a meaning would be attributed to that headline. Such an intention is absolutely out of the question."

The newspaper accepted that the headline can be seen as an editorial mistake that goes beyond its purpose. "For that, we are sorry," it said.

"The weakening of our army and attempts to drag it into domestic politics are situations that every Turkish citizen should reject.

The army remaining under the orders of civilians that acquire their posts in elections is an essential condition for our democracy."

Meanwhile, the Bakirkoy chief public prosecutor's office in Istanbul has launched an investigation into Firat's report following a complaint from an academic at Istanbul University, according to Turkey's state-run Anadolu Agency.

READ MORE: Die Welt's Deniz Yucel held for 'terror links' in Turkey

Fikret Bila, another veteran journalist and Hurriyet columnist, is officially appointed as Hurriyet's editor-in-chief on Wednesday, according to Turkish media reports.

In its 95-year history the Turkish republic has faced three military coups, in 1960, 1980 and in 1997.

On February 28, 1997, the military presented the coalition led by Prime Minister Necmettin Erbakan with an ultimatum that led to its collapse.

It became known as the postmodern coup because of the absence of actual violence in the military's replacement of the government.

During this "postmodern coup", which was aiming to end the influence of political Islam in Turkish politics, most mainstream Turkish media organisations, including the Hurriyet daily, followed an editorial line sympathetic to the military.