By Nick Assinder
Political correspondent, BBC News website
Frontbench reshuffles are always fine balancing acts - David Cameron's was more precarious than usual.
At one level, he had to re-jig his team simply to cover the changes Prime Minister Gordon Brown has made to Whitehall departments - effectively abolishing the departments of education and trade.
Mr Cameron had a fine balancing act to pull off
He also had to counter the "youthful" element in the new Brown government with some fresh young blood of his own.
At the same time he will have wanted to do something to grab the headlines.
And all this without making it look like a panic measure in reaction to the succession of Gordon Brown and the creation of his "new" government.
No easy task, particularly as the prime minister and his home secretary are currently winning praise for the way they have risen to the challenge set by the attempted car bombings in London and the Glasgow airport attack.
The first eye-catching appointment, which echoed the innovations made by the prime minister, was to give the national security advisers' job to former head of the joint intelligence committee, Dame Pauline Neville-Jones.
At the same time, and with the fight against terrorism top of the political agenda, Mr Cameron has put Sayeeda Warsi, a British-born Muslim of Pakistani origin, in charge of community cohesion.
Dame Pauline will be chief security adviser
It's believed that she is the first Muslim to join the cabinet of any party. She unsuccessfully fought the seat of Dewsbury - where the 7 July bombers came from. She will be given a seat in the Lords, as will Dame Pauline.
These two appointments echo the emphasis Mr Brown has placed on security and bringing in "all the talents" with the appointments of former Metropolitan police chief Lord Stevens and former navy head and chief of defence intelligence Admiral Sir Alan West to Brown's Cabinet.
Meanwhile, high-flier David "two brains" Willetts has fallen victim to the shakeup in the education department - and his own part in the recent grammar schools row which hit Mr Cameron - by being demoted.
Party chairman Francis Maude, who had been tipped as a casualty, has been replaced by Caroline Spelman, helping boost the number of women in top jobs.
Mr Willetts was criticised over grammar schools row
Younger faces including Michael Gove, Jeremy Hunt and Nick Herbert, all of whom entered Parliament at the last election, have also been given key jobs.
What Mr Cameron has not done is move any of the most senior figures or go for the sort of comprehensive re-shaping of his team of the sort carried out by Mr Brown.
He seems to have succeeded in lowering the age range, bringing in more women and strengthening the security brief without causing major ructions within his shadow cabinet.