Chris Grayling, the former shadow home secretary, has been demoted to junior pensions minister.

He was expected to be pushed down the party ranks after making a number of gaffes in the last year, including saying that B&B owners should have the right to bar gay couples.

Mr Grayling’s new role in the Cameron-Clegg coalition government was announced today. He lost out on the home secretary job to Theresa May, who was also appointed equality minister.

He has covered the pensions portfolio before, having been shadow minister for work and pensions, and will work under work and pensions secretary Iain Duncan Smith.

Mr Grayling’s controversial remarks were secretly recorded shortly after a Christian couple hit the national news for barring a gay couple from staying in their B&B.

He was asked for his view at a think-tank meeting in April and, making reference to gay couples, said: “I personally always took the view that. . . if it’s a question of somebody who’s doing a B&B in their own home, that individual should have the right to decide who does and who doesn’t come into their own home.”

He later apologised for the remarks and said he supports gay rights.

Mr Grayling’s position was in jeopardy since the Conservative Party’s autumn conference, where he called the appointment of former army head Sir Richard Dannatt as an advisor to his party “a political gimmick”.

He apparently thought the appointment had been made by the Labour Party and later claimed to have misheard the question. Mr Grayling was also accused of using misleading crime figures earlier this year.