Boris Johnson has retained Nicky Morgan as culture secretary despite her standing down as an MP before last week’s election.

To allow for the surprise move, Morgan has been made a life peer. The decision followed speculation over a range of mooted candidates for the role, from Morgan’s predecessor John Whittingdale to former Sky executive Andrew Griffith, newly elected MP for Arundel and South Downs.

Morgan said she had agreed to remain in post for a few weeks, until the prime minister could carry out a full-blown reshuffle, expected after Britain has left the European Union at the end of January.

The former representative for Loughborough announced she would stand down as an MP in October in a letter in which she cited “the clear impact on my family and the other sacrifices involved in, and the abuse for, doing the job of a modern MP” as part of the reason for her decision.

But she was highly visible during the election campaign while other senior ministers, including Andrea Leadsom and Victoria Atkins, were hardly seen.

Morgan appeared on the BBC Radio 4 Today programme twice and was memorably quizzed by Piers Morgan on Good Morning Britain over the government’s pledge to recruit 50,000 more nurses, 19,000 of whom were just being retained.

At the time, senior Tory sources said she had been offered a job and a peerage, but she denied it.

Quizzed by the Guardian on 25 November over whether she had communicated with anyone connected to No 10 or Boris Johnson about a possible job in government or peerage, she replied with a single word: “No.”

The Conservatives took a swath of Labour seats in Thursday’s poll to secure an unexpectedly large majority of 80, liberating Johnson from the internecine parliamentary struggles that marred Theresa May’s premiership.

Johnson also appointed Simon Hart, the MP for Carmarthen West and South Pembrokeshire, as Welsh secretary to replace Alun Cairns, who resigned early in the campaign after backing a former aide who had been accused of deliberately collapsing a rape trial.

Morgan told the Guardian she had handed in her departmental pass and bid her staff and government driver goodbye – but that Johnson had called her on Monday morning and asked her to stay on.

“He wanted to keep changes to a minimum; the plan is to focus on what he wants to get done immediately,” she said.