ISTANBUL — At dawn on Tuesday the police raided the offices of several businessmen with close ties to Prime Minister Recep Tayyip Erdogan as part of a wide-ranging corruption investigation, immediately raising the stakes of an unfolding political contest of wills here between two men who have long held sway over the country’s Muslim masses: an ailing and aging Turkish preacher who lives on a sprawling compound in the Poconos, and Mr. Erdogan.

The corruption dragnet, in which the sons of three cabinet ministers were also detained on allegations of bribery, is a threat to Mr. Erdogan, involving as it does the same issue inciting the wave of antigovernment demonstrations that swept the country last summer: the construction business and public financing of real estate.

The investigation also threatens to shake Turkey’s political establishment ahead of a series of elections that will determine the future of the country’s Islamist governing party, in power now for more than a decade. But it also figures in the personal battle going on between Mr. Erdogan and the charismatic preacher, Fethullah Gulen.

The preacher left Turkey in 1999 for exile in America after he was accused of trying to establish an Islamic state. He presides over a global following in the millions, some of whom have come to fill the ranks of Turkey’s police and judiciary, including a prosecutor said to be leading the latest corruption investigation.