A report on the Troopergate affair to be published today is expected to throw light on to a politician known as a moral crusader but whose values are questioned from right and left

When the man working for Frommer's, America's best-selling travel guide, alighted on the small town of Wasilla in south-central Alaska, he concluded glumly that the place should be condemned as "the worst kind of suburban sprawl". To the European eye it would barely be a town at all. Rather, it is a four-lane highway that clatters across the magnificent, mountain-fringed Matanuska-Susitna valley, dumping seven miles of strip-malls, petrol stations and supermarkets in its wake.

Wasilla is home to 9,780 people, hundreds of small businesses, a dozen evangelical Christian churches, and a handful of gun stores. The churches are places where many of the faithful see signs that judgment day cannot be far away and where the infallibility of the Bible is rarely, if ever, questioned. The gun stores are places where you can pick up the new Ruger 10/22 carbine, the one that comes in bright pink with a 10-round magazine - "perfect for your wife or daughter".

Famously, Wasilla is also the home town and launch pad for Sarah Palin, John McCain's vice-presidential running mate. Palin is a woman for whom many Republicans have high hopes, despite performances in early television interviews that were so wobbly they have become YouTube classics. She remains a politician who many in the party would like to believe could be a future president.

Her selection six weeks ago saw a slew of stories about the former beauty queen with the brilliant smile and the carefully styled mom-in-a-hurry hairdo, who could drop a caribou at a thousand paces before skinning it, butchering it, and hauling it home for the freezer. In a country that regards the wilderness surrounding Wasilla as a last bastion of rugged, can-do libertarianism, her story seemed to be a potent, 21st-century update on America's central myth.

But Wasilla is no frontier town. A third of the town's workforce commute to office jobs in Anchorage, 45 miles to the south. Many others work in the endless strip malls. Palin may shoot, fish and ride a snowmobile, but her neighbours are more accustomed to seeing her leap into the 4x4 to drive to the local Starbucks. Palin's home town represents, at most, the call of the semi-wild.

So if the image of McCain's running mate as a tough outdoorswoman is part truth and partly a confection of her party's machine, what are we to make of the rest of the package?

What will be revealed about her later today with the conclusion of the investigation into the so-called Troopergate affair, in which she is alleged to have abused her power as state governor by sacking the head of the Alaskan state police after he refused to become involved in a family feud?

Is Palin truly a warrior of the religious right, a woman who advocates the teaching of creationism and who is opposed to abortion, even for victims of rape and incest? Would she, as opponents claim, seek to ban books from library shelves?

Who, in short, is Sarah Palin? And what on earth does she want?

Palin was born in February 1964 in another small town, Sandpoint, Idaho, the third of four children of Chuck and Sally Heath. Genealogists have traced her father's family tree as a far as John Lothropp, a nonconformist minister from Beverley in Yorkshire, who settled in Massachusetts in 1634 to escape persecution. If so, this would make Palin a distant relation of George Bush.

Headstrong girl

The family moved to Alaska when Sarah was two months old after Chuck, a primary school teacher, took up a post there. Accounts of her time at Wasilla high school suggest a headstrong, slightly pushy, but popular pupil: a girl who was determined to succeed on the sports field, and who wanted to be noticed, who liked to be liked.

Her university days appear to have been considerably less happy. In five years she flitted between as many different colleges, in Hawaii, Idaho and Alaska, sometimes quitting after one term. It is unclear why she was so unsettled. It is clear, however, that she was far from the centre of attention at this time: after McCain named Palin as his running mate, the Idaho Statesman newspaper tracked down 30 of her former teachers and classmates at two colleges in the state. Only four could remember who she was.

Returning to Wasilla in 1987 she worked as a sports reporter with her local newspaper, the Mat-Su Valley Frontiersman, and as a correspondent for an Alaskan television station. She showed little interest in forging a lengthy career in journalism, instead marrying her high school sweetheart, Todd Palin, a part Yup'ik Native Alaskan who works as a technician with British Petroleum on the state's North Slope oilfield. In 1989 the first of the couple's children was born and, in keeping with the Alaskan fashion for unusual names, the boy was named Track, because he arrived during the athletics season.

Since parading her five children, including Bristol, 17, who is pregnant, and Trig, a six-month-old boy with Down's syndrome, at the Republican national convention last month, Palin has been the subject of bizarre internet rumours about her children's parentage, and reports in the supermarket tabloids alleging an extramarital affair, which her team dismissed as a "vicious lie". In Wasilla, people who know the couple say their marriage appears genuinely to be strong.

During the early 90s, when Palin was raising her children, Wasilla and the other small towns in the valley were undergoing rapid change as they sucked in immigrants from that place known to Alaskans as "Outside" - the rest of the US. And in common with other communities in the US, the valley towns were riven by tension between secular liberals on one hand and Christian traditionalists on the other, people who had little interest in - and no hope of - reconciling their fundamental disagreements over abortion, gay rights, gun control and censorship.

In Palmer, for instance, a town 20 minutes drive north-east of Wasilla, there was a struggle for control of the hospital, one of the few in Alaska where second trimester abortions were carried out. There were demonstrations and court battles, and rumours that one gynaecologist had taken to wearing a bulletproof vest beneath her jacket.

In Wasilla, the curator of the town's tiny museum, John Cooper, says he received threats from people from a local evangelical church. "They simply wanted to let me know that my political views, as a liberal, as a progressive, were not welcome," he says.

This was the conflict into which Palin waded when she decided to stand for election as mayor of Wasilla.

Palin had been a junior member of the town's council for four years, and in 1996 decided to run against the popular mayor, John Stein. Perhaps unusually for such a small-town affair, she won an endorsement from the National Rifle Association and attracted the support of a nationwide anti-abortion organisation that leafleted the town's voters.

In Palmer, the Rev Howard Bess, a left-leaning Baptist minister, is convinced Palin was the candidate of a network of evangelist pastors that met regularly in the valley in a conclave calling itself the Ministers' Prayer Group. "Palin first came on the political scene in the context of this conflict focused on the abortion issue," says Bess. "You can't understand her without understanding the culture wars that took place in the Mat-Su Valley in the 90s."

Laura Chase, who managed Palin's campaign, recalls her not as doctrinaire but as seriously ambitious. "We were sitting at my kitchen table at about 11 o'clock one night, talking about term times, and she said: 'If I haven't moved on to higher things after two terms, I don't deserve to be in politics.' I said: 'Sarah, you'll be governor in 10 years.' And she said: 'I don't want to be governor, I want to be president.' I glanced up and she was looking down at a piece of paper, she was on to the next thing we were doing. I just chalked it up to the adrenaline of the campaign."

Today, people who loathe all that Palin says she stands for cannot help admire her common touch. Bill Clinton says: "I come from Arkansas. I get why she's hot out there, why she's doing well." Even in 1996, Palin seemed to float along on a tide of likability. The way she looked, the way she sounded, the way she moved - it all combined to make people feel they knew her in some way, and that they should vote for her. "She was a rock star, no doubt about it," says Stein.

Nobody in Wasilla believes that Palin's parents, by all accounts reserved people, coached such polished performances. Rather, Stein and others point to the confidence that came with high school sporting success, her brief time as a TV reporter, and the opportunities she had to speak up at church.

Chase sees something else. "She's really pretty insecure. I was with her before she gave a speech to the people from BP in Anchorage when she was running for governor, and she was terrified. There are real fears there. But every time she goes out and persuades people to like her, it lifts her, it makes her feel better about herself.

"She draws on something inside herself to make them like her. She's a natural actress. And then she wants to do it again, with even more people. She's a brilliant politician, but it's all about getting more and more people to love her."

With her charismatic appeal and the backing of many of the town's evangelicals, Palin triumphed in the mayoral contest, winning by 616 votes to 413. Stein, a Lutheran, recalls a local radio station reporting that the town finally had a Christian mayor.

In office, Palin did not push the conservative social agenda at the heart of her election campaign. She couldn't: she was running an authority little bigger than an English parish council - albeit one with a $6m budget - and her main responsibilities were for planning applications, road maintenance, and the town's 13-strong police force.

Confrontational style

Her critics in Wasilla say she made the job appear more difficult than it was because of her confrontational style of management. She sacked the police chief, other senior staff resigned, and Cooper was made redundant. "One of her conservative supporters came up to me in the street and said: 'Gotcha Cooper!'"

The town's librarian, Mary Ellen Emmons, was fired after standing up to Palin during a conversation about censorship. She was reinstated shortly afterwards, amid a public outcry, and the McCain team now insists that the conversation had been "rhetorical". But Chase says she recalls Palin telling the librarian that she objected to a children's book about gay parents called Daddy's Roommate. "I brought a copy to the next council meeting and offered it to Sarah to read. She said: 'I don't need to read that kind of stuff.'"

The Frontiersman was excoriating.

An editorial accused the mayor of confusing her 616 votes with a "coronation", adding: "Palin promised to change the status quo, but at every turn we find hints of cronyism and political manoeuvring."

A public meeting was held in the town's theatre, with some urging a recall, a form of impeachment, to remove her from office. Palin learned her lesson fast, lowering her profile and leaving day-to-day administration to the council's senior civil servant. "I grew tremendously in my early months as mayor," was how she later described that time.

When Palin was 12 she was born again, and was baptised in the frigid waters of one of the half-dozen lakes around Wasilla. From that day, and throughout her time as mayor, she and her mother worshipped at the Assembly of God, a Pentecostal church where some members of the congregation speak in tongues, and where the current pastor is on record as saying he believes that the end of the world is nigh.

While Palin has since moved to another evangelical church - reportedly telling friends it is "less extreme" - Pentecostalism undoubtedly helped forge her views. She says she believes creationism should be taught alongside evolution, and says abortion is an "atrocity" that should be permitted only when the life of the mother is at stake.

When she made her next step in Alaskan politics, however, she made no attempt to turn these views into policy. Nor, to the displeasure of local Republicans, did she make much effort to uphold traditional party values. Instead, by the time Palin ran for governor in 2006, she had remoulded herself as a campaigner against sleaze and corruption.

It was a good moment to be a moral crusader. For two years the FBI had been raiding the homes and offices of prominent Alaskan Republicans, investigating their links with oil companies. Five politicians were eventually charged with bribery and corruption.

The incumbent Republican governor, Frank Murkowski, was wildly unpopular - largely because of his cosy relationship with Big Oil - and Palin had established her ethical credentials by resigning from the state's Oil and Gas Conservation Commission in protest at what she described as the corruption of fellow Republicans.

Turning on their TVs during the election, many Alaskans saw Palin's folksy, nose-wrinkling, you-betcha style for the first time, and they liked what they saw. They liked that she was fresh and she was feisty and that she really did seem to offer change. Disillusioned Republicans were relieved to see someone - anyone - doing battle with the party's leathery old guard. Polls showed that even university-educated, liberal women warmed to her. Palin was swept effortlessly into office, capturing 48% of the vote in a three-way race.

She surrounded herself with a group of aides whose loyalty was beyond question. Soon they came to describe themselves as Palinistas. According to a number of sources, one of her aides, who is on the state payroll, has been working as a full-time babysitter for Trig in recent months. Todd Palin also appears to play a role in the government of the state. Although unelected, and not holding any salaried office, he is known to take part in a number of meetings.

The new governor enjoyed approval ratings of more than 80% in the months after her election. But it was not long before a slightly puzzled electorate began wondering who it was that they had elected and what it was that she really believed.

Forging alliances with Democrats, Palin pursued a shamelessly populist agenda, imposing a windfall tax on oil companies. Leftwing Democrats hailed the Palinistas as "Alaskan redneck socialists", while Republicans muttered that their governor was "imposing British levels of taxation". After she used a chunk of the revenue to send a $1,200 cheque to each man, woman and child in the state, her opponents knew protest was pointless.

'Disappointingly liberal'

She dismayed many on the religious right by blocking a bill that would have denied benefits to same-sex partners of state employees, maintaining she had no choice because it was unconstitutional. She also resisted Republican attempts to force abortion restriction measures on to the legislative agenda, apparently because she did not wish to alienate her new Democrat allies. Lyda Green, Republican president of the state senate, speaks for many in the party in Alaska when she says Palin has been "disappointingly liberal" since she was elected governor.

Others, who had hoped to see Palin translate her high approval rating into legislation aimed at tackling Alaska's perennial problems of alcohol abuse and underperforming schools, were exasperated by how little she wanted to do.

Larry Persily, a senior civil servant who has worked for three Alaskan governors and is a former associate director of Palin's office in Washington, says: "She was just not interested. She had no interest in public policy beyond the populist drive to raise oil taxes and push through ethics reforms that the Democrats had already drafted."

Rebecca Braun, editor of Alaska Budget Report, a non-aligned political newsletter, adds: "If she hasn't pushed the teaching of creationism in schools, it's because she hasn't pushed the teaching of anything in schools. She hasn't promoted her rightwing views because she hasn't promoted any views at all. She really hasn't done very much."

But if Palin's approval ratings were falling by last summer, her sincerity as a social conservative being questioned, her Republican credentials under attack, and her commitment to reform belied by a track record of inertia, she could always point to her impeccable ethical standards.

And then came Troopergate.

Palin stands accused of sacking the head of the state's police force, Walt Monegan, when he refused to dismiss her former brother-in-law, a state trooper who had been through a bitter divorce and child custody battle with her younger sister. There is evidence suggesting some members of her family waged a vendetta against the trooper, Mike Wooten, making complaints that he had broken the law, committed disciplinary offences, and lied to obtain sickness benefits. Eventually a divorce court judge warned family members to leave the man alone.

Wooten was investigated and disciplined in March 2006, but when Palin was elected governor later that year, she and her husband, and members of her staff, are said to have pressed to have the case reopened. When Monegan was sacked last July, he claimed that his refusal to fire Wooten had cost him his job, an allegation Palin denies.

An investigation into Troopergate was ordered by the state's legislature, and a report on the matter is due to be published today. While Palin initially agreed to cooperate, her husband and several members of her staff resisted giving evidence, despite being summonsed. It has also emerged that Palin and her senior aides used personal email accounts while conducting official business in order to conceal their communications about Wooten.

Many Alaskans have been greatly disappointed by Palin's behaviour during the Troopergate affair. Patrick Dougherty, editor of the Anchorage Daily News, the state's main newspaper, says the episode has "raised serious doubts about her honesty and integrity".

By late August, Palin's approval ratings were still high in Alaska, but there were growing doubts about her ability and sincerity, and there was an investigation hanging over her head. And at this point, no doubt looking at her public performances and her star quality, McCain and his team decided she was the ideal running mate.

Dougherty says his reaction was one of disbelief when he heard. "She was clearly unqualified."

Lyda Green was equally astonished. "I'm a loyal Republican and I want to see the Republican party do well and do the right thing. But before she was selected, no one came to Alaska and asked the questions you're asking now. And that, to me, is insufficient."

If McCain had sent people to Alaska with instructions to ask who Palin really is, to find out what substance lay behind the style, how successful might they have been?

Asked what drives his former boss, Persily confesses he cannot be sure. "She likes being in the limelight, being the centre of attention. What she really craves is popularity, she wants the warmth and love of the public." Laura Chase says Palin has an uncanny ability to be all things to all people. "She can walk up to people and quickly have a perception of what they want her to be, and she will instantly be that person."

Persily and Chase, who do not know each other, use the same word to describe Palin: chameleon. Both also use similar language to explain how much she unnerves them.

Chase says: "I admire her, she has boundless energy and great determination. But the idea that she could be the leader of the free world scares the hell out of me."

Persily believes Palin is "immature, inexperienced, and has poor judgment", but acknowledges that she could still become president. "And that," he says, "should scare the hell out of everybody."

· The following correction was printed in the Guardian's Corrections and clarifications column, Saturday October 11 2008. The Alaska public safety commissioner fired by Sarah Palin last year is Walter Monegan, not Irl Stambaugh as we said in early editions of the paper. Stambaugh was the police chief of Wasilla who was fired by Palin in 1997. The error was introduced during the editing process