ANKARA, Turkey — Three Cabinet ministers resigned in Turkey on Wednesday, days after their sons were taken into custody in a sweeping corruption and bribery scandal that has targeted Prime Minister Recep Tayyip Erdogan’s allies in one of the worst political crises of his more than 10 years in power.
Economy Minister Zafer Caglayan and Interior Minister Muammer Guler announced their resignations in statements carried by the state-run Anadolu Agency.
Environment and Urban Planning Minister Erdogan Bayraktar gave his resignation from both the Cabinet and Parliament in a live interview with the private NTV television during which he also urged the prime minister to step down.
All three ministers denied any wrongdoing.
Caglayan’s and Guler’s sons, along with the chief executive officer of the state-run bank Halkbank, are among 24 people who have been arrested on bribery charges. Bayraktar’s son, Abdullah Oguz, was detained as part of the inquiry but later released from custody.
The investigation is focusing on alleged illicit money transfers to Iran and alleged bribery for construction projects.
Media reports said police have seized $4.5 million in cash that was stashed in shoe boxes in the home of the bank’s CEO, while more than $1 million in cash was reportedly discovered in the home of Guler’s son, Baris.
Erdogan has denounced the corruption inquiry as a plot by foreign and Turkish forces to thwart his country’s growing prosperity and discredit his government ahead of local elections in March.
Critics accuse Erdogan of becoming increasingly authoritarian, but his government has won three successive elections since 2002 on the strength of the relatively robust economy, a clean image, and a promise to fight corruption.
The investigation is one of the biggest political challenges Erdogan has faced since his Islamic-based party narrowly escaped closure in 2008 for allegedly undermining Turkey’s secular Constitution. This summer, the government also weathered a wave of antigovernment protests sparked by a development project that would have engulfed a beloved Istanbul park.
Wednesday’s resignations came as a surprise. Erdogan was expected to remove ministers implicated in the scandal quietly, through a Cabinet reshuffle that was planned before the corruption allegations erupted.
The planned reshuffle aimed to replace three other ministers who are standing for mayoral positions in March elections.
Turkish commentators believe the investigation is fallout from an increasingly public feud and power struggle between Erdogan’s government and an influential US-based Muslim cleric, Fethullah Gulen, whose followers are believed to have a strong foothold within Turkey’s police and judiciary.
The two men, without naming each other, have been engaged in a war of words since the corruption inquiry was launched on Dec. 17.
Gulen has denied being involved in the investigation. He left Turkey in 1999 after being accused by the then-secular government of plotting to establish an Islamic state. He was later cleared of that charge and allowed to return to his homeland, but he never has and is living in Pennsylvania.
In an address to his party’s provincial leaders, Erdogan distanced himself from the ministers who resigned by emphasizing his party’s record and determination to fight corruption.
But he also repeated a claim that his government was the target of an international plot involving the media and ‘‘gangs” inside Turkey — a tactic he used during the summer’s antigovernment protests to deflect criticism.
‘‘There are media institutions, organizations, and gangs in Turkey who think of others’ interests rather than their own country’s interests, and are working as spies in a treasonous manner,” Erdogan said.
In a veiled attack on Gulen, Erdogan said: ‘‘They speak of the Koran and of Allah but are remembered for . . . plots.”
Erdogan threatened to expel ambassadors last week after pro-government newspapers accused US Ambassador Francis J. Ricciardone of scheming against the government.
One newspaper, Sabah, pressed ahead with that allegation Wednesday by claiming that a US diplomat had prodded a business group to join an ‘‘antigovernment lobby.”
That prompted a new rebuttal from the US Embassy. “Allegations targeting US Embassy employees published in some media organs do not reflect the truth,” the embassy said. ‘‘No one should endanger Turkey-US relations through such intentional slander.”
As he resigned Wednesday, Caglayan again questioned the legitimacy of the investigation. ‘‘It is clear that the operation is a dirty conspiracy against our government, our party, and our country,” he said.
In an interview with NTV, Bayraktar also denied any wrongdoing, complained of being pressured into resigning by Erdogan, and insisted that ‘‘a great proportion” of construction projects that are allegedly under investigation were approved by the prime minister.
‘‘I want to express my belief that the esteemed prime minister should also resign,” Bayraktar said.
Guler, the interior minister, told reporters on Tuesday that he is the victim of a political plot and that there is nothing his family could not account for. He also said alleged wiretap recordings of a conversation with his son were tampered with, and that the cash discovered in his son’s house was money earned from the sale of a luxury villa.