The following correction was printed in the Guardian's Corrections and clarifications column, Monday 11 January 2010

In the article below, we referred to David and Ed Miliband as the first brothers to sit in a cabinet together since Austen and Neville Chamberlain in 1931. The most recent pair was actually in 1938 – ­(Edward) Lord Stanley and his brother Oliver Stanley.

At the foot of the North Downs in Kent lies a magnificent 17th-century pile that has enchanted visitors for centuries. Lord Rosebery was so taken by Chevening House that the former prime minister crossed out its name on the estate's writing paper and simply wrote "Paradise" when he stayed there in the summer of 1911.

It was to the gentle surroundings of Chevening, home to the Earls of Stanhope for seven generations from the time of George I until 1959, that a family of impeccable New Labour credentials escaped over the Christmas break.

David Miliband, who has the run of Chevening as foreign secretary, invited his younger brother and fellow cabinet minister, Ed, to join his family there. The party also included the brothers' partners and their three young children and their mother, Marion.

The Milibands are the first brothers to sit in a cabinet together since Austen and Neville Chamberlain in 1931. They have achieved the remarkable feat of rising almost to the very top of British politics while remaining genuinely close. "David and Edward have always been very solicitous of one another's feelings as well as opinions," says Leo Panitch, an old friend of their parents.

This Christmas, however, must have had a rather different feel, thanks to the sensitive matter that has been steadily creeping up on the brothers recently – the leadership of the Labour party. Both brothers have had the same thoughts for months, if not years: that there is likely to be a vacancy after the general election and Miliband Sr, 45, will be the frontrunner to succeed, or even displace, Gordon Brown.

But as 2009 drew to a close, it became increasingly apparent throughout the Labour party that there is growing support for the foreign secretary's younger brother, Ed, who turned 40 on Christmas Eve. His successful performance at the Copenhagen talks – the climate change secretary is credited with saving the negotiations from complete collapse with an impassioned intervention in the early hours of the Saturday morning – coupled with his affable manner is leading senior Labour figures to talk up his chances.

One cabinet colleague sums up the thinking: "I think David is the senior figure. But it is fluid. It looks like David now and not Ed. But you can't be sure. David only half wants the job, as we have seen. Ed probably only half wants it. I'm not sure which one it will be. It depends who comes out of the election campaign with stardust."

Comparisons are being drawn with 1994 when the frontrunner – Gordon Brown – was displaced by his junior - Tony Blair - who was thought to have a more natural appeal to voters. There is one crucial difference. Unlike Blair, who had decided that Brown lacked the mettle for the leadership when he declined to run in 1992, Miliband Jr has not reconciled himself to challenging his older brother and is full of dread at the prospect of a contest.

"It is a nightmare scenario for both of them. Ed and David will have to sit down and talk about it. That will be terrible. It is mortifying," says one New Labour veteran, who has known the brothers for the best part of two decades.

"It is a bit like two brothers who fall in love with the same woman. That woman loves both of them. What should they do? Flip a coin? Actually, it is horrible. If it is a woman, it only matters to three people. But who is leader of the Labour party matters to the country."

The decision the Milibands make will have a profound impact on the party to which they have devoted their lives. Will Ed continue to defer to his "more famous brother"? Or will he break new ground and put his name forward, either immediately when a vacancy arises or only if David struggles to win support?

Whatever decision they make, friends believe the depth of their brotherly love means they will not fall out. "I would be very surprised if there was any bad blood between them," says Panitch.

The leafy surroundings of Primrose Hill, home to some of the leading lights in London's intelligensia, providesthe backdrop to the Miliband partnership. In the white stucco-fronted family house in a side street between Primrose Hill and Camden Town, the two brothers were inspired as they were growing up by some of the grandest figures on the left.

In the 1970s the Marxist intellectual Ralph Miliband and his academic wife Marion Kozak, survivors of the Holocaust, hosted the likes of veteran leftwinger Tony Benn, the head of the ANC's military wing, Joe Slovo, and Tariq Ali.

"It was just very good fun to go there for meals," Benn says of the house, now home to David and his family. "David and Ed were both clear-headed and both of them still are."

Panitch believes that the Milibands' involvement in what he calls "practical politics", despite being the sons of an eminent Marxist theoretician, is down to Ralph's passionate interest in day-to-day affairs. "When The World at One came on the BBC at 1pm the house stopped," says Panitch, editor of the Socialist Register founded by Ralph. "Everyone would be downstairs listening to the radio, often with comments being made. You know: 'Denis Healey could have said that much better than he did,' or 'Jim Callaghan fluffed that one.' The boys quickly picked that up. They developed an ear for what was effective and principled from a remarkably young age."

As they matured politically the two brothers, who are four and a half years apart in age, formed a strong bond when they followed their father on a series of academic postings, first to Leeds in the early 1970s and then to the US.

"David and Edward were not competitive, they were not trying to one up one another," Panitch recalls. "There was a lot of mutuality."

It was little surprise that the brothers embarked on an identical path. They attended Haverstock comprehensive school in Camden before both studying politics, philosophy and economics at the same Oxford college, Corpus Christi, under the same tutor. The late Andrew Glynn, a Marxist friend of their father's, was a key influence on both men.

The Milibands were studious at Oxford. David was known as Donny Osmond thanks to his pudding bowl haircut, while Ed was known as Ted in those days. Friends joke that he dropped the name to fit in when he started working alongside two other Eds (Balls and Richards) under Gordon Brown.

Neither Miliband shone on the wider Oxford stage. Their highest electoral office was as president of their college Junior Common Room (JCR), a post they won as active members of the Labour club. Ed's greatest revolutionary act was to lead a rent strike.

Their parents were deeply proud of their sons' achievements. But Benn says: "I think Ralph [who died in 1994] would have been a bit disappointed in the way it has developed. Very proud but also a bit disappointed."

Panitch says: "Given that Ralph wrote the book on the limits of parliamentary socialism it is surprising his sons ended up as Labour party politicians, at least in the age of the third way."

It was after Oxford – Ed graduated in 1992 with a 2:1, five years after his brother had secured a first – that their paths began to diverge. In 1994 David went to work for Tony Blair as his head of policy, a position he kept in Downing Street. In the same year, Ed went to work for Gordon Brown as a speechwriter and economic adviser.

The brothers now found themselves on either side of what would become the biggest divide in British politics for the next decade. But still they were close and would talk constantly, even though they moved in different social circles. It helped that, by now, they were living under the same roof, though in separate flats. Ed had the top flat in a house in Chalcott Square, close to their family home in Primrose Hill, while David lived downstairs. "They were in and out of each other's flats," one friend says.

The Milibands were never caught up in the full Blair/Brown wars because they both escaped before blood was spilled: David left No 10 in 2001 to become an MP, while Ed took a sabbatical to Harvard soon afterwards to lecture on government, just as Brown declared open war on Blair over public service reform. It also helped that Ed was going out with Liz Lloyd, a member of the No 10 policy unit, and he occupied the unofficial post of Brownite ambassador to No 10. "Ed always tried to be very nice," one member of the Blair team recalls. "He was the reverse of hectoring."

Their professional paths met again in the House of Commons in 2005 when Ed was elected as MP for Doncaster North. His older brother had been elected four years earlier in South Shields. By the summer of 2007 they were both members of Brown's first cabinet.

But it is their time on either side of the Blair/Brown divide that is returning to haunt the brothers as the party looks to a future beyond the two giants of New Labour. To the admirers of Blair, the foreign secretary is seen as the true keeper of the New Labour flame. To large swaths of the Labour movement, and most particularly to the unions, anyone associated too closely with Blair is beyond the pale.

It is against this background that one key figure, who was instrumental in securing the Labour leadership for Blair in 1994, is likely to find himself playing the role of kingmaker again.

One of the more comic turns at this year's Labour party conference, which cheered up the delegates as they faced near certain electoral defeat, was the speech by Lord Mandelson. In a performance worthy of a vaudeville act, the first secretary of state and lord president of the council, to list just two of his numerous titles, finally won over his beloved Labour party when he declared: "If I can come back we can come back." This cemented Mandelson's place as a kingmaker in the Labour leadership contest as he was cheered to the rafters by the three sections of the electoral college: MPs and MEPs, the unions and constituency Labour parties.

Mandelson is a great admirer of both brothers. He believes the foreign secretary has grown into his job and would be a strong candidate for the leadership. He sees the younger Miliband as a precious asset who may need to be kept safe for the future.

Scarred by his experience in 1994, Mandelson is keeping his counsel. But he will be aware where the weight of opinion lies around the cabinet table: the foreign secretary is the natural frontrunner, who enjoys the private support of Blair, but his younger brother is closing in fast.

One cabinet minister says: "It must be the case that David is ahead. He is the foreign secretary, he is older. But you can't tell in politics. If there were to be a vacancy David would be the obvious person. In a year's time or so who knows? It depends where the party is."

With support growing for Miliband Jr, supporters of his older brother are embarking on some discreet lobbying. As the frontrunner, Miliband Sr has everything to lose unless he builds up strong momentum. His friends are sending out three key messages: he will definitely run; he does have guts and decided against running in the past for sensible reasons; and he is not, after all, a true Blair devotee.

One friend says: "It is absolutely clear that David is going to stand. There is no doubt."

Knowing that some see him as a bit of an outsider, with a slight tendency to be a grand intellectual, the friends point out that he showed his devotion to the Labour party by spurning a guaranteed future on the diplomatic circuit as the EU's high representative for foreign policy. "David sacrificed being Henry Kissinger for 10 years to stay and fight for the party," according to one friend.

Europe gave Miliband Sr the chance last autumn to restore his place as the frontrunner to succeed Brown – he had faltered after the prime minister mocked him as a "novice" at party conference in 2008 – when he launched a passionate attack on the Tories for teaming up in the European parliament with a Latvian party, some of whose members commemorate the Latvian Waffen SS. "It makes me sick," Miliband Sr told the Labour conference.

While Miliband Sr was praised widely for his speech, friends know they have their work cut out to persuade the Labour party that he is made of steel after missing three chances to stand for the leadership. He rejected Mandelson's advice to challenge Brown when Blair stood down in 2007; fluffed his chance again in the summer of 2008 at one of Brown's low points, and was famously pictured looking absurd holding a banana at the Labour conference a few months later. Finally, he failed to deliver what would have been a fatal blow to Brown when he declined to follow his great friend, James Purnell, after he resigned from the cabinet in June.

One friend says: "The narrative is David bottled it three times. That is fundamentally wrong. He has a steely determination to be leader of the Labour party. On each occasion he did not go for it because it would not work."

If Miliband Sr persuades the party that he is not a bottler, he still has to dismiss the perception that he is a stooge of Blair who is privately backing him for the leadership. This explains why union barons – led by the Unite joint general secretary Derek Simpson, who is bankrolling Labour's general election campaign – are beginning to voice support for his younger brother.

Benn, who employed the younger Miliband to work on his diaries after his O-levels, reflects this view. "It is a fact that David was very very close to Blair in the No 10 outfit at a time when Blairism was at its height. Ed had a different life. People tend to look at somebody's record. I dare say it would have an effect."

Arch Blairites believe Miliband Sr has a credible defence here: they never saw him as a true believer and were relieved when he was ousted by Blair as head of his policy unit in the run-up to the 2001 general election to make way for one of their own, Andrew Adonis, now the transport secretary. "David was never dewy-eyed about Tony," one of his closest friends says of Miliband Sr, who once dismissed Blair's Third Way as "wanky". Another figure from that era recalls how bruised Miliband was when Blair announced that his time would come to an end and that David should stand as an MP in 2001. Miliband was upset when Adonis replaced him, even though Blair made clear that he was cabinet material.

The former No 10 figure explains why Blair, while retaining affection and admiration for the man known by Alastair Campbell as "Brains" after the Thunderbirds puppet, did not believe he was sufficiently zealous to lead public service reforms in Labour's second term. "Tony always thought that David was 80% Blairite and Andrew was 120% Blairite. At that time he preferred a 120% Blairite who would push him to be a reformer further than the politics would allow, rather than someone who would warn him about about how far he could go."

Meanwhile Miliband Jr is keeping quiet. "Ed is now conscious that people are talking about him as a potential leader," says one New Labour veteran. "It is a situation he wishes was not there, because that means that he has become a rival to his brother. If David had not been born and you looked at the Labour party and said who would be leader, there is no doubt that Ed would be on a list of the top three. The problem is that David was born and was born before Ed."

Miliband Jr has four strengths, goes the thinking. He is a more natural media performer than his brother, as his assured appearances at Copenhagen showed; he connects more easily with the party, which he has been courting assiduously as co-ordinator of Labour's general election manifesto; and he would find it easier to unite the party, whose left and right wings are warming to him. As a 40-year-old, who has only been an MP for five years, he represents more of a break with the Blair/Brown era.

There is another factor that is being whispered: he may have worked for Brown, but Miliband Jr has not been afraid to stand up to his master. A year ago he irritated the prime minister by wringing out environmental concessions before signing up to the third runway at Heathrow.

"Heathrow was Ed's coming of age," one member of the cabinet says. "Ed, who made life quite difficult for Gordon, had a big influence on the decision. But he is collegiate and he has stuck by it."

This stand answered the charge, friends say, that he is indecisive. It also saw him line up against the most powerful Brown courtier, the schools secretary, Ed Balls, who takes a pro-business line on Heathrow.

Miliband Jr will be treating Balls with caution. Balls, another serious contender for the Labour leadership who can barely stand the sight of Miliband Sr, may well be keen to see the younger brother assume a higher profile as a way of undermining his own arch-rival.

Another cabinet minister, who watched the Heathrow showdown, is blunt about the choice. "It has to be Ed [Miliband]. He is the future."

Another influential fan says: "If we lose [the election], Labour deserves to have the best possible leader. You have to ask who has the most potential to connect with voters and to articulate their values. David is a nice guy. But Ed is better."

It takes an outsider to spell out their strengths and weaknesses. Professor Sir David King, the government's former chief scientist, became a huge fan of Miliband Sr when they worked closely on climate change at the old environment department. But the younger Miliband, who meets King these days on climate change, is catching his eye.

"Most of us have become increasingly impressed with Ed. David appears to be a little bit gauche, a little bit strange in the public eye, prone to suck the end of his tie in public, which would embarrass his wife, or put his feet up on a table in front of a big audience. This is because his mind becomes totally engaged with the problem and he sort of forgets what his hands and legs are doing. But there is something absolutely charming about that. That is something that can be built on as a political asset. Ed is more the quiet guy that gets on with it. The intellect is similarly very good. I think Ed is inclined to be more modest and is as good as David at taking on advice. He is a very good listener. Both of them have that attribute."

As the Milibands return to Westminster this week, refreshed from their break in the Kent countryside, they know that they face a heavy decision. The senior Miliband remains in front for the moment. But after the election that could all change.

"It is possible that Ed wants David to be leader," says one senior figure who knows them well. "But there may come a point when it becomes apparent that David does not have enough support. There may be enormous pressure for Ed to stand and enormous pressure for David to stand aside. It is all about how it feels after the election."

The Milibands' mother, Marion, will look on with concern over the coming months, though her advice may be limited. "Do you know about my mother's politics," the older Miliband says with great affection of his socialist mother. "Ed and I have sold out."