It was an eventful week for the former minister as he re-entered the political game - but more obstacles lie ahead en route to the top
Last month Michael Portillo and his wife, Carolyn, flew on holiday to Peru. They climbed through the undergrowth on the mountain leading up to the secret ancient city of Machu Picchu. And as they walked around the ruined temples and houses, successfully hidden by the Incas from the former defence secretary's Spanish ancestors, they were all too aware that the media conquistadores were about to invade their own secret world.

At the end of July, shortly before flying out to Lima, Portillo had given an interview to the Times in which he talked about his "homosexual experiences" as a young man. Friends say he had expected the newspaper to publish his admission straight away. Instead the editor, Peter Stothard, insisted on holding it until September when it would make more of an impact in the run-up to the political conference season. Inevitably, the Peruvian holiday was dominated by fears about what the reaction would be, among the public but also in the Tory party.

Portillo had decided some months earlier that he should "come clean" about his gay past before returning to public life. As he walked on a pilgrimage across Spain, he came to the conclusion that the best way to end once and for all rumours that he had had an affair with his cabinet colleague Peter Lilley was to reveal the true extent of his homosexual experiences. When he returned to London, he discussed the implications of going public with his wife and his loyal adviser Alison Broom over white wine and anchovies in the Portillos' local tapas bar, Goya. The two women told him they thought the public was now so accepting of homosexuality that it would not damage his political career. All his family and close friends - and some not so close - knew what had happened and accepted it. The only potential problem was that the revelation would be less acceptable to old-fashioned Tories.

The former minister was ready to take this gamble - especially in Kensington and Chelsea, a constituency association packed with as many thrusting young metropolitan things as blue rinses. Before the general election, he played almost exclusively to the Conservative gallery - his speech comparing the party to the SAS and calling on the Government to "stop the rot" in Brussels was designed to endear him to the Tory grassroots, not the ordinary voter. But since his startling defeat in his Enfield, Southgate constituency in the May 1997 general election, when he realised that the people who elected him mattered as much as the politicians who could make him their leader, Portillo has concentrated on getting "back in touch" with the punters. He took a job as a hospital porter to investigate the problems of the NHS, visited single mothers on council estates, and listened to focus groups. Last week's admission was just as much a part of the public rehabilitation process. Labour spin doctors are already at work highlighting Portillo's extremism because they fear that his confession will soften his cold-hearted image.

It was crucial to Portillo that the declaration be made in the right context. There are rumours that the tabloids have got compromising photographs, or have tracked down former lovers - although the aspiring MP's friends insist that this gossip is not true. It is probably no coincidence, however, that the revelation was made to the Times, a newspaper whose editor is both a political and personal friend, and whose comment editor, Michael Gove, wrote a glowing biography calling Portillo the future of the Tory right.

The interview itself was conducted by Ginny Dougary, a feature writer, and when it actually happened the politician was clearly ill at ease discussing his sexuality - on several occasions he asked the journalist to switch her tape-recorder off as he tried to work out what to say. There were close negotiations about the way in which the "scoop" would be presented - Stothard agreed not to use the "gay" story in the headline, although the paper did slip it into the smaller strapline at the top of the front- page article. The contents of the interview were such a closely guarded secret in the Times's Wapping headquarters that the story was not discussed at the daily morning conference, and the political editor who wrote it up for the front page was not told about it until lunchtime. Portillo did not discuss his admission with William Hague in advance of publication, although Conservative Central Office did find out about the Times story independently at about 5pm, as it was going to press. The Tory leader phoned his "close colleague" the next day, once the news had broken, to assure him of the party's support in both the selection process and the by-election.

Conservatives on both the left and the right of the party agree that Portillo will "walk" into the position of Tory candidate for Kensington and Chelsea - its association members like the idea of having a high-profile representative. Other potential candidates including Sir Malcolm Rifkind and Sebastian Coe have also agreed to give him a free run. Once selected, it would be virtually impossible for him to lose one of the safest Tory seats in the country at a by-election, giving him just over a year to serve his time in the Commons before the next general election. Hague's close aides insist he is genuinely happy about the return of such a prominent potential rival to Westminster - "It's good for William if the party does well at the election and he thinks Michael Portillo will help it do well," one said.

But privately, the Hagueites know that if Michael Portillo does get back, Tory politics will be dominated from then on by speculation about a leadership challenge. The former defence secretary is also acutely aware that this could be his downfall - at a recent meeting of the Burke Club, the dining society for Tory grandees, he threatened to walk out when the conversation turned to the party leadership because he did not want to be seen as being disloyal to Hague.

Portillo has carefully distanced himself from the Tory leader in recent months - there was his suggestion that the party was unwise to rely so heavily on its treasurer-in-exile, Michael Ashcroft, his comment that Hague had image problems, and most memorably the television documentary in which a Byronic Portillo interviewed an anorak-clad weed on the Yorkshire moors. But once he gets into Parliament, Portillo knows he must do everything he can in public to prove his loyalty until the next general election because he knows the party does not like to elect traitors to lead it.

After the election, however, it will be a different matter altogether. Shortly before 1 May 1997, the then defence secretary sat down with his closest advisers to write his manifesto for the leadership of the Conservative Party. Those present included two Central Office policy wonks, Andrew Cooper and Michael Simmonds - both of whom have since been eased out by Hague, an indication that he still fears the power of the Portillistas. Like Tony Blair hand-writing his "contract with the nation", Portillo began to put on paper his definition of "new Toryism". It would be a philosophy that emphasised its caring qualities as much as its hard-headed free market instincts, that represented ordinary people rather than an elite. The politician has been developing these ideas ever since - arguably, his supporters say, he could explore them better outside Westminster than within the constraints of party loyalty. Friends claim Portillo was painted unfairly into a corner as an extreme right-winger - although it was an image he deliberately stoked because he thought that was what the party wanted in a leader.

Since his election downfall he has emphasised his caring side, replacing military briefing papers with Alain de Botton's novels about love, and travelling on the number 73 bus rather than by ministerial car. He has also begun sending out different political signals. At the 1997 Tory conference he "came out" as a "compassionate Conservative" who urged the party to tolerate lone parents and gays. Since then, he has called for increased investment in hospitals and for better treatment of doctors. At this year's conference he will promote the cause of teachers with a high-profile speech on education.

This shift is making Portillo some unlikely friends - he got on so well with Peter Mandelson when he interviewed him for television that he invited him for dinner at his Pimlico home. More importantly for his political career, he has managed to persuade those on the left of the Tory party that he is not extreme. Shaun Woodward MP, who supported Kenneth Clarke for the leadership, describes Portillo as "mainstream, a centre-right Conservative rather than a right-wing Conservative".

Some of those MPs who would have crossed the committee corridor to avoid the former minister in the last Parliament are now privately discussing lending him their support in a future leadership contest. "There are quite a lot on our wing of the party who are saying he's softened and we should give him a chance," one Conservative left-winger said. "It's strange but he's managing to position himself as the unity candidate." There is just one subject on which this cannot be true - Europe. Portillo privately goes further than the Hague line and argues that the single currency should be ruled out on principle; some friends say he even buys the Thatcher argument that Britain should renegotiate its relationship with Brussels or pull out. The Tory left would never accept such a position. But it seems likely that softening his attitude to "rotten" Brussels would be a softening too far.