Italian PM Silvio Berlusconi's days in power have come to an end. Despite repeated gaffes and scandals, he won three elections and set a postwar record for the length of his premiership. The BBC's David Willey, who has covered Italian politics for four decades, asks how he did it.

Over the past century Italy has had no lack of troublesome leaders.

Silvio Berlusconi, who has been the dominant figure in Italian politics for the past 17 years, is the latest on the list.

He has been the object of at least 23 judicial investigations, mostly for corruption.

He has been heard speaking on YouTube, giving sex advice to a prostitute, Patrizia Addario, who had a hidden tape recorder under her breakfast napkin after a night of group sex.

Prosecutors accuse him of having sex with minors.

And his offensive and vulgar off-the-cuff wisecracks at international meetings, such as saying that German Chancellor Angela Merkel's behind is not worth penetrating, do little to endear him at home or abroad.

In numbers At least 51 votes of confidence in his government since it took power in 2008

Three election victories - 1994, 2001 and 2008

Two election defeats - 1996 and 2006

Four ongoing trials

75 years old

$6.2bn - net worth of Berlusconi and his family (Forbes, 2011) In pictures: Berlusconi in politics Relief and concern in Italian press

Conflicts within his fractious cabinet over how to deal with the economic crisis have meanwhile brought his government to a standstill, with the result that for months he has been hounded by the opposition, and even by some of his friends, to resign as premier.

He has infuriated businessmen and industrialists, as well the opposition by steadfastly refusing to go, until now, on grounds that he would be doing a disservice to those who voted for him and for his Freedom Party (PdL) in national general elections in 2008.

Pollsters say that his popularity with voters has sunk to 20%.

Despite all this, many Italians still defend and love him with quasi-religious fervour. He has been Italy's most prominent politician for almost two decades. He is still the single richest man in Italy and, according to Forbes magazine, the 118th wealthiest in the world in 2011.

He is still the great communicator - a raunchy Ronald Reagan - whose aura is, to many, intact.

The potency of that aura was perhaps unwittingly revealed by the conservative newspaper editor Vittorio Feltri. Speaking on a national TV talk show on Monday, Feltri decried those asking for Berlusconi to step aside. "If you were in England, you wouldn't ask the Queen to step aside, would you?" Feltri burst out angrily.

To his admirers, then, Berlusconi is not simply one more of the Italy revolving-door premiers who have characterised postwar Italy. He is royalty.

Super-salesman

How did this come about, and what was his secret? How did a man who wears high heels to appear taller, who has visible hair transplants and makes no secret of his many facelifts, hoist himself high enough to become at one and the same time Italy's richest and most powerful individual - without becoming a dictator, without recourse to brutality or secret police tactics?

Italy's troublesome leaders Hitler's foremost ally, Mussolini, was the worst, but post-war Italian premiers have included the Socialist Bettino Craxi, who fled to Tunisia in 1994, where he lived until his death in the year 2000 in order to dodge a probable prison sentence for bribery and corruption. Although later cleared by Italy's highest court, enough evidence had been assembled against Giulio Andreotti, a Christian Democratic who was premier seven times, for an appeals court to sentence him to 24 years in prison for protecting the Sicilian Mafia.

The answer is both simple and complex. Berlusconi is an ebullient, canny man with energy to burn, who has gone through life "riding on a smile and a shoeshine", to borrow Willy Loman's famous phrase in Arthur Miller's play Death of a Salesman.

Unlike the tragic travelling salesman Loman, Berlusconi became one of the world's most successful, if not the most successful, super-salesmen of modern times.

If so, he had help. Berlusconi, born in 1936, came of business age during a period of rapid economic growth.

In 1987 alone, Italian GDP rose by 18%, and the country bounced up to become the fifth economic power in the world. Throughout this boom era, moreover, Berlusconi's home base of Milan was Italy's beating financial heart, a place where an ambitious entrepreneur had ample room to manoeuvre.

Milan was also politically convenient because its mayor was the brother-in-law of the Socialist Premier Bettino Craxi, whose own political base was Milan. Later Craxi would stand as godfather to one of Berlusconi's five children.

Berlusconi also benefited from the radical transformation taking place in politics throughout the West, and not only in Italy.

During the period of consolidation of Berlusconi's wealth in the 1980s and his subsequent entry into the national political arena in the early 1990s, the nature of politics changed, becoming less ideological.

Berlusconi's regular message was that he, like the defunct Christian Democratic party, was a dike against Communism, but what mattered more to the public was not only that he had a beautiful wife (and, notoriously, other beautiful women as well), but that he owned a soccer team, AC Milan.

First fortune

It had not always been that way. Born to a middle-class family in Milan, where his father was a bank employee and his adoring mother, Rosa, a housewife, Berlusconi learned his salesman skills early on, and also how to operate in a tight-knit group.

In business First foray in business: Selling vacuum cleaners

Builds reputation as a crooner in nightclubs and on cruise ships

Sets up the Edilnord construction company in 1961 around his native Milan

Media: Owns Mediaset media empire, controls Italy's three biggest private TV stations, its largest publishing house and AC Milan

At elementary school, as he is wont to remind listeners, he wrote homework assignments for his mates, for which he was paid with their mid-morning snacks.

In his Catholic high school, he played the double bass and sang with a band, whose drummer was a fellow student named Fedele Confalonieri. During their university years in Milan, the two signed on to cruise ships as musical entertainers, with Berlusconi crooning into a microphone.

Later, Confalonieri helped Berlusconi set up his first TV studio, built from scratch in Milan. Today the drummer boy is 75 years old, and runs Berlusconi's financial interests. He is president of Berlusconi's media corporation Mediaset SpA, and also conveniently president of the National Television Association (ATN).

"All of my old high school mates but one are still on my team," Berlusconi once told a reporter with evident satisfaction.

While attending Milan State University, from which he graduated in 1961, Berlusconi upgraded his sales skills with an honours degree in marketing.

While in his twenties he became an entrepreneur, starting in the construction industry, reportedly beginning with loans arranged through his father. His big coup came when he was able to acquire a vast stretch of empty farmland for a low price because, near the main Milan airport, landing planes flew too low overhead.

The Berlusconi mausoleum My first meeting with Silvio Berlusconi was in 1994, the year he first came to political power. I had been invited to tea on the garden terrace of his manicured mansion at Arcore, near Milan. We sat on a swing hammock and he talked charmingly and convincingly of his plans for changing Italy. The invitation came via a sculptor friend, who had just completed for Mr Berlusconi a family mausoleum in the spacious park surrounding his villa. The grandiose Berlusconi tomb has a 10-tonne abstract sculpture of white Carrara marble as a grave marker above ground. In imitation of an Etruscan chamber tomb, broad marble steps lead down to a narrow passage to a spacious burial chamber - a monumental pink granite sarcophagus which reminded me of one of the tombs of the Pharaohs in the Valley of the Kings in Egypt. Thirty-six empty burial recesses surround Mr Berlusconi's future resting place on a central plinth. "Who will occupy them?" I asked. "Family and business associates," he replied. I understood immediately the Italian leader's strong sense of association of family and business loyalty. By the way, the monumental tomb has been declared illegal as it infringes local building regulations. It may never be occupied by its owner.

Unexpectedly the landing pattern was changed. The construction of the new suburb called Milano Due began and, with it, Berlusconi's first fortune.

At the heart of Milano Due was Berlusconi's first TV studio. Such local TV stations were permitted, but a law forbade creation of a national network to rival the trio of state-owned RAI networks, each of which was parcelled out to a political party in a fair reflection of their relative strength in Parliament.

In defiance of this monopoly, Berlusconi and his business associates set up other local TV broadcasting stations, then despatched motorcycle riders flying down the motorways to all Italy's main cities, with tapes of his newscasts, which ran consecutively. This became unnecessary when Premier Bettino Craxi shoved a law through Parliament that broke the state monopoly.

At the same time, the nature of politics in TV everywhere was evolving. Previously in Italy politics had dominated the media, but now it was the contrary.

Politics became more personalised, and political talk shows were suddenly expected to be entertaining, with people shouting at each other and occasionally throwing glasses of water. Berlusconi's well honed crooner-salesman skills meshed perfectly with this brave new Italian world of entertainment-based political TV.

"In Berlusconi," says Milan University sociologist Gianpietro Mazzoleni, "we can see the epitome of the 'media-isation' of politics subordinate to the media system."

At that point, Berlusconi became a media magnate who owned three networks - the most important was Canale 5. Acquisitions of newspapers and magazines followed.

Through it all, he never gave up crooning, and together with Neapolitan singer Mariano Apicella he is still making CDs. The two sing duets at his parties. The newest CD - called Il Vero Amore (True Love) - is due out on 22 November, Apicella says.

"Berlusconi sends me the words, I write the music - but sometimes it's the other way around. This one will have a samba and some Latin American stuff too."

Protection

Although the 1970s catapulted Milan into hedonism and high fashion, terrorism was also a menace there, and US drug enforcers uncovered a vast heroin network with a lab in Milan itself.

Image caption Mangano was hired to run the Berlusconi stables - he was later jailed for drug-trafficking and murder

The children of wealthy industrialists were regular targets of kidnappers. In 1973 Berlusconi hired a known Mafioso, Vittorio Mangano, purportedly to run the stables at the large and elegant mansion at Arcore, a Milan suburb, which Berlusconi had just acquired.

Presumably to guarantee protection for the Berlusconi children, Mangano lived at Arcore for perhaps three years. Two Sicilian Mafia turncoats told prosecutors in Palermo that Berlusconi's finance company, Fininvest, had paid out to Cosa Nostra 200 million lire (today, about 100,000 euros) via Mangano and a key Berlusconi aide, Marcello Dell'Utri.

Nevertheless, emulating other industrialists, Berlusconi then sent his family to live outside Italy for a time for safety.

According to Palermo prosecutor Paolo Borsellino (himself murdered by the Mafia), Mangano was an important go-between for the Sicilian Mafia in Milan. In 1995, Mangano was jailed for drug trafficking. Five years later, he was convicted for murder in Palermo. He died in 2000.

In April 2008, Dell'Utri scandalized many Italians by declaring in an interview that Mangano had been "in his way, a hero". In a TV broadcast the following day, 9 April, Berlusconi himself said that while Mangano had been in his employ, he had "behaved very well".

"He stayed with us and took my children to school. But then he had the misadventure of falling into criminal company."

Berlusconi also claimed that Mangano had refused to make accusations against Berlusconi himself, despite allegedly having been prodded by prosecutors.

He says he hates to be hated, but I think he will be remembered as a great corrupter Professor Giovanni Sartori, Political scientist

Dell'Utri, 70, was born in Palermo and became an aide to Berlusconi in the 1970s and subsequently an officer in Berlusconi's main holding company Fininvest and a partner in Berlusconi's advertising agency, Publitalia.

When Berlusconi decided to enter national politics in the early nineties with a brand new political party called - like a football cheer - Forza Italia (Go Italy!), Dell'Utri was crucial in organising the new party's network in Sicily.

From 1996 until now he has been a member of Parliament, the European Parliament, and the Senate. As such he has Parliamentary immunity - useful because, like Berlusconi himself, he has been under investigation for years.

In 2010 a Court of Appeal sentenced Dell'Utri to seven years in prison for Mafia association. Another court acquitted him on charges of Mafia extortion.

After the media came the message, usually writ large.

Those who remember Berlusconi from his early days in business in Milan recall that he was always a snazzy dresser, sometimes wearing his old cruise-ship navy blue blazer with brass buttons. He is a stickler for dressing correctly, and almost always shows up in Parliament in navy blue suit, white shirt and plain dark tie.

There is little correct about his private life, however. His extra-marital friendships with underage girls such as Ruby, the Moroccan, led to his indictment on charges of having sex with minors.

The activities of the bevy of leggy showgirls and escorts who have frequented the court and attended the parties of the man that many commentators now disparagingly call The Sultan, have become staple fare for many Italian newspapers and magazines.

His wife Veronica sued for divorce after describing her husband's behaviour as "sick".

Clever

Whatever the future holds for Silvio Berlusconi, he is a man who has succeed in changing the politics and perhaps even the face of Italy during the past two decades.

In power 1993: Founds own political party, Forza Italia - Go Italy - named after an AC Milan chant

Founds own political party, Forza Italia - Go Italy - named after an AC Milan chant 1994: Becomes prime minister, forming coalition with National Alliance and Northern League

Becomes prime minister, forming coalition with National Alliance and Northern League 1996: Loses general election to Romano Prodi

Loses general election to Romano Prodi 2001: Returns to power in coalition with his former partners

Returns to power in coalition with his former partners 2006: Loses the election, again to Romano Prodi

Loses the election, again to Romano Prodi 2008: Wins general election, begins third term as prime minister

I asked one of the country's most distinguished political scientists, Professor Giovanni Sartori, who has taught at universities on both sides of the Atlantic, how he would sum up the Berlusconi era.

"He is an extraordinarily clever and wealthy man," he told me.

"He started from nothing. In politics he has a sure instinct how not to solve problems, how to turn any event to his advantage, and how to neutralise any event that cannot advantage him. Even in the economic crisis he makes it appear that he has done very well and that it is not his fault.

"He says he hates to be hated, but I think he will be remembered as a great corrupter. He is totally sincere when he speaks, and also totally unscrupulous. I don't know anybody who could beat him at his game."

Yet however battered Silvio Berlusconi may be following the loss of his parliamentary majority, he may not be completely out of the game.

The former president of RAI, Italy's state broadcaster, Lucia Annunziata, said on TV: "Beware the dead donkey!" Asked what that means, she replied: "He looks dead. Then he kicks you!"

The super salesman might still attempt to rebrand himself.