Former Robert Murdoch aide Rebekah Brooks told an inquiry Friday she received commiserations from British Prime Minister David Cameron after she resigned amid the News of the World phone hacking scandal. In her long-awaited testimony before the Leveson inquiry into press ethics inquiry, Brooks said she also received messages from the offices of finance minister George Osborne, the foreign ministry and the interior ministry. Brooks, 43, a former editor of the News of the World, resigned as chief executive of Robert Murdoch\'s British newspaper wing News International in July 2011 after the hacking scandal broke. She was arrested shortly afterwards over allegations of phone-hacking and bribing public officials. She and her racehorse trainer husband Charlie Brooks were rearrested in March on suspicion of perverting the course of justice. Asked about a report in The Times that Conservative leader Cameron had sent a text message saying \"keep your head up\" after her resignation, Brooks said the message was \"along those lines\" but that it was \"indirect\". \"I don\'t think they were the exact words but that was the gist. It was indirect,\" she told the inquiry. \"I received some indirect messages from number 10 (Downing Street, Cameron\'s office), number 11 (Osborne\'s office), the Home Office, Foreign Office,\" Brooks said. Former Labour prime minister Tony Blair also sent a message of commiseration but his successor Gordon Brown was \"probably getting the bunting out\", she said. Murdoch\'s Sun newspaper had dropped its support for Labour ahead of elections in 2010. Cameron has been a friend of Brooks\' husband for 30 years since they studied together at Eton, the elite British boarding school. The Camerons and the Brookses are also neighbours in the prime minister\'s constituency in rural Oxfordshire, forming part of what is dubbed the \"Chipping Norton Set\", a group of the rich and powerful who live near the village of the same name.