ISTANBUL — Meral Gurgun and her family, economic refugees from Turkey's impoverished rural heartland, were in deep trouble.
When they arrived five years ago in the rundown, densely populated Bagcilar district of Istanbul, her husband could find only the most menial jobs. Far behind on their rent, they struggled to find money for the children's school fees. The electricity was cut off again and again.
Until the day a short, rumpled woman in sensible shoes knocked on their door and asked how she could help.
"She was such a friend and sister to me," said Gurgun, whose careworn face made her look older than her 38 years. "Without her, I don't know how we could have survived."
The family's savior was Beyhan Ayci, a volunteer from the local branch of the ruling Justice and Development party, known by its Turkish initials AKP. She got the power turned back on, arranged for subsidized school fees, helped work out payment of back rent.
In sprawling urban districts such as Bagcilar, where daily life centers on rural migrants' efforts to climb out of poverty, party activists such as Ayci have helped cement voter loyalty, block by neighborhood block.
As Turkey embarks on what probably will be the country's most divisive and hard-fought election campaign in years, the AKP's brand of community activism could prove a decisive factor -- in part because it reflects a formidable organizational structure that the more secular-minded opposition parties can only envy.
The party -- an outgrowth of Islamist political groups that were banned -- is fighting a fierce backlash from the opposition, whose constituency is rooted in Turkey's traditional secular elite of civil servants, judges, university professors, military men and the old-money establishment.
For the last month, secular Turks have taken to the streets by the tens of thousands, voicing fears that the AKP, despite pledges to the contrary, will seek to erode the country's constitutionally mandated separation of Islam and government.
But the AKP fully expects to prevail in the July 22 parliamentary elections, largely by dint of its grass-roots appeal. In style if not in religious principle, its approach echoes the classic model of Islamist parties such as Hezbollah and Hamas -- a mix of charity work, municipal boosterism and well-oiled political machinery.
Party officials say that in Istanbul alone they have 120,000 neighborhood-based volunteers who will now turn their attention to getting out the vote.
"We'll knock on a million doors," said Oczan Unlu, a spokesman at the AKP's Istanbul branch headquarters. "And then a million more. And a million more."
Reflecting the party's tight internal discipline, the AKP has been more successful than others in getting its supporters to cast ballots. Although the opposition has been able to organize huge anti-government street rallies over the last month, it is less confident of translating that into votes.
When the election date was being decided, secular-minded parties said they would be disadvantaged by a July vote, because many of their supporters would be on seaside holidays.
Election officials are still trying to agree on rules to govern television advertising during the campaign, but it is expected to be sharply restricted, making personal contact and door-to-door appeals more important.
The AKP, sometimes referred to as "AK," which means white or clarity, has another common bond with Islamist parties elsewhere: an image of fiscal integrity that has proved a valuable asset at the ballot box. Public fury over corruption among more secular Turkish parties helped propel the AKP to power in 2002, when it secured a comfortable parliamentary majority.
Although the July election is viewed by many as a referendum on the role of religion in public life, the contest has blurred many of Turkey's traditional political and social distinctions.
The AKP, like its Islamist precursors, once appealed almost exclusively to the rural poor, but as the Turkish economy has boomed under its stewardship, the party's religiously conservative power base has become better educated and more urbanized, and gained economic clout.
Those changing fortunes can be seen in districts such as Bagcilar. Once a thinly populated area between Istanbul's city center and its international airport, it was transformed almost overnight into a slum as migrants began pouring in from the countryside three decades ago.
But in the years that the AKP has been in power, Bagcilar has been transformed yet again. The party-run municipal government embarked on a campaign to build the area's infrastructure -- paving roads, constructing parks and playgrounds, laying water mains. The district recently opened its first public swimming pool -- with gender-segregated hours, because religiously observant men and women would not want to mix.
At a gleaming rehabilitation center opened three years ago by the municipality, a physical therapist in an Islamic head scarf talked softly to a young mother while together they manipulated the limbs of 2 1/2 -year- old Ramazan, who has cerebral palsy.
"Before the AKP, there was no facility like this, where disabled children could get quality medical care for free," said Ayfes Bakis, one of the center's administrators.
The district's effervescent leader, Feyzullah Kiyiklik, a veteran of several banned Islamist parties, said community work, and not religion, would continue to be the party's mainstay.
"If someone wants to accuse us of having a hidden agenda, an Islamist one, we can't change their minds by force," he said. "We can only do our work -- and there is so much work to do."