The head of the BBC's Westminster political programmes team has been named as Prime Minister Theresa May's new director of communications.

Robbie Gibb, who edits the Daily Politics, replaces Katie Perrior, who quit before the general election.

He worked for the Conservative MP Francis Maude in the 1990s, as well as Michael Portillo.

He tweeted it had been "a privilege to work for the BBC " and he would "always be a supporter" of the corporation.

Mr Gibb has edited several BBC political programmes during a long career at the Corporation, including the Daily Politics, This Week and the Andrew Marr Show, and is a former deputy editor of Newsnight.

The BBC's director of news, James Harding, said he had been "an innovator in story-telling on television and an unrelenting advocate of the BBC, its independence and our public service role".

"The signal quality he and his programmes have shown is the willingness to speak truth to power - I suspect it will come in handy," he added.

Following reports that he had been interviewed for the job, the BBC's diplomatic correspondent James Landale tweeted that he had been asked to consider it but decided not to apply.

Ms Perrior, a former PR executive, resigned as Mrs May's director of communications when the PM called a snap general election in April. She went on to criticise Mrs May's closest advisers Nick Timothy and Fiona Hill, who were forced to stand down when the PM lost her majority.

Her predecessor in the Downing Street communications role, Sir Craig Oliver, was also poached from the BBC, where he was editor of the Ten O'Clock News.

Mr Gibb's brother is the Conservative MP and schools minister Nick Gibb.

The position of Downing Street director of communications, which was first held by Alastair Campbell under Labour PM Tony Blair, has normally been held by a former newspaper or TV journalist.