A Turkish court has released five people, including the sons of two ministers, who were detained on corruption allegations in mid-December in a high-profile probe that has rocked the government, according to local media.

The private NTV channel reported on Friday that Baris Guler, the son of the former interior minister, as well as Kaan Caglayan, the son of the ex-economy minister, and Azerbaijani businessman Reza Zarrab, were among those freed.

NTV said the suspects were released because the "necessary evidence had been collected".

Guler and Caglayan had been charged with acting as intermediaries for giving and taking bribes, while Zarrab was suspected of forming a ring that bribed officials to disguise illegal gold sales to sanctions-hit Iran via state-owned Halkbank.

The men walked free two weeks after Suleyman Arslan, the former chief executive of Halkbank, who was also caught up in the police raids, was released.

Arslan was accused of corruption, fraud and money laundering in connection with illegal gold sales to Iran.

The graft scandal has struck at the heart of Prime Minister Recep Tayyip Erdogan's government, posing the biggest challenge yet to his 11 years in power.

The crisis has prompted a cabinet reshuffle and the two ministers whose sons were implicated in the scandal have resigned.

Erdogan has accused supporters of exiled Muslim leader Fethullah Gulen, who wields considerable influence in the judiciary and police, of launching the probe as part of a plot against his government ahead of local polls in March.

Erdogan has retaliated by sacking or reassigning hundreds of police and prosecutors believed to have links to Gulen.