ISTANBUL — Seven journalists were detained Thursday in connection with a long-running investigation into a murky network that prosecutors maintain has been plotting to overthrow the government, a case that critics have characterized as a pretext to neutralize dissidents.

The police raided the homes and offices of 11 people in Ankara and Istanbul. Among those detained were Nedim Sener, an investigative journalist for the newspaper Milliyet; Yalcin Kucuk, a writer who is a prominent critic of the governing Justice and Development Party; and Ahmet Sik, a journalist and academic who alleges that an Islamic movement associated with Fethullah Gulen, a Turkish-born cleric living in the United States, has infiltrated the country’s security forces.

Mr. Sener and Mr. Sik were defiant as police officers took them into custody at their homes before television cameras. “Whoever touches it gets burned!” Mr. Sik shouted, referring to the Gulen movement. Mr. Sener’s neighbors decorated his Istanbul building with Turkish flags to protest his detention.

Four journalists with an anti-government Web site, OdaTV, were also detained. A few weeks ago, the authorities raided the Web site’s offices and arrested the site’s owner, its news editor and a writer.

The arrests are the latest in a years-old investigation into purported plots to overthrow Prime Minister Recep Tayyip Erdogan’s government after his Justice and Development Party came to power in 2002, unnerving the country’s secular elite with its Islamic roots. Dozens of current and former military personnel, as well as intellectuals and politicians, have been arrested in connection with various plots that prosecutors say were conducted under the auspices of a network called Ergenekon.

Leaders of Turkey’s armed forces have denied that any military-led plot existed. Critics of the government say the investigation has become a pretext for punishing opponents of the government.

Mr. Erdogan said Thursday that the case would proceed in accordance with the law. “Regarding today’s detentions; as we’ve always said, these are not things that happen upon our orders,” he said in a televised statement from Ankara. “The only thing I want to say is that these processes should be concluded as soon as possible.”

The head of the Ankara Bar Association, Metin Feyzioglu, called the raids illegal, given what he characterized as a lack of clear allegations. “These search warrants are against the law,” he said in a televised statement in front of Mr. Kucuk’s office in Ankara. “Everyone can be subject to these search warrants based on abstract reasons, without specific accusations,” he said.

The Turkish Journalists Association says 58 journalists in the country have been imprisoned. A United States State Department spokesman, Philip J. Crowley, said last month that the United States had “broad concerns about trends involving intimidation of journalists in Turkey.”