Matt Hancock's affair with an aide came up on the doorstep in the Batley and Spen by-election, the chair of the Conservative party has said.
Amanda Milling said the scandal was among issues raised by voters, after Labour retained the West Yorkshire consituency by just 300 votes.
But she refused to be drawn on whether Boris Johnson's handling of the situation – which at first saw him dismiss the matter as ‘closed’ – had gone down badly in the seat.
"It was something that came up on the doorstep, I have to be honest about that," she told Sky News on Friday morning after the result.
"They had some issues over the weekend in terms of what happened. But Matt [Hancock] resigned and that was the right thing to do. There was a whole host of different issues that came up."
Recommended Maternity scandal trust could now face criminal prosecution Ministerial code ‘undermined’ by Boris Johnson needs urgent overhaul, think-tank warns Ollie Bibby: hospital apologises to mother unable to visit dying son
Ms Milling stated that "governing parties don't win by-elections" and argued that "actually taking it to such a small number of voters was itself a tremendous result", describing the result as "quite extraordinary".
Defending the government's approach, she added: "Matt did the right thing at the weekend, which was to resign. Within 24 hours of the story breaking we had a new health secretary and Sajid Javid is doing a tremendous job."
But asked specifically about Boris Johnson's handling, she said "There's a lot of love for the prime minister, he gets a tremendous lot of love on the doorstep. As I say, Matt did the right thing to resign and within 24 hours we had a new health secretary."
The Conservatives had hoped to win the seat, following a similar victory taking a constituency off Labour in Hartlepool in early May.
A poll released during the campaign had shown the Tories in the lead, but ultimately Keir Starmer's party managed to cling on despite a collapse in the Labour vote.
UK news in pictures Show all 50
1/50UK news in pictures
UK news in pictures 1 July 2021 Prince William, left and Prince Harry unveil a statue they commissioned of their mother Princess Diana, on what would have been her 60th birthday, in the Sunken Garden at Kensington Palace, London
AP
UK news in pictures 30 June 2021 Dancers from the Billingham Festival and Balbir Singh Dance Company, during a preview for the The Two Fridas, UK Summer tour, presented by Billingham International Folklore Festival of World Dance in collaboration with Balbir Singh Dance Company, inspired by the life and times of female artists Frida Kahlo and Amrita Sher-Gil , which opens on July 10 at Ushaw Historic House, Chapel and Gardens in Durham
PA
UK news in pictures 29 June 2021 A boy kicks a soccer ball in front of the balconies and landings adorned with predominantly England flags at the Kirby housing estate in London
AP
UK news in pictures 28 June 2021 Emergency services attend a fire nearby the Elephant & Castle Rail Station in London
Getty
UK news in pictures 27 June 2021 People walk along Regent Street in central London during a #FreedomToDance march organised by Save Our Scene, in protest against the government’s perceived disregard for the live music industry throughout the coronavirus pandemic
PA
UK news in pictures 26 June 2021 A pair of marchers in a Trans Pride rally share a smile in Soho
Angela Christofilou/The Independent
UK news in pictures 25 June 2021 Tim Duckworth during the Long Jump in the decathlon during day one of the Muller British Athletics Championships at Manchester Regional Arena
PA
UK news in pictures 24 June 2021 A member of staff poses with the work 'The Death of Cash' by XCopy at the 'CryptOGs: The Pioneers of NFT Art' auction at Bonhams auction house in London
EPA
UK news in pictures 23 June 2021 Bank of England Chief Cashier Sarah John displays the new 50-pound banknote at Daunt Books in London
Bank of England via Reuters
UK news in pictures 22 June 2021 Actor Isaac Hampstead Wright sits on the newly unveiled Game of Throne's "Iron Throne" statue, in Leicester Square, in London, Tuesday, June 22, 2021. The statue is the tenth to join the trail and commemorates 10 years since the TV show first aired, as well as in anticipation for HBO's release of House of the Dragon set to be released in 2022
AP
UK news in pictures 21 June 2021 Scotland's First Minister Nicola Sturgeon receives her second dose of the Oxford/AstraZeneca Covid-19 vaccine
AFP/Getty
UK news in pictures 20 June 2021 Joyce Paton, from Peterhead, on one of the remaining snow patches on Meall a’Bhuiridh in Glencoe during the Midsummer Ski. The event, organised by the Glencoe Mountain Resort, is held every year on the weekend closest to the Summer Solstice
PA
UK news in pictures 19 June 2021 England appeal LBW during day four of their Women’s International Test match against India at the Bristol County Ground
PA
UK news in pictures 18 June 2021 Scotland fans let off flares in Leicester Square after Scotland's Euro 2020 match against England ended in a 0-0 draw
Getty
UK news in pictures 17 June 2021 Members of the Tootsie Rollers jazz band pose on the third day of the Royal Ascot horse racing meet
AFP/Getty
UK news in pictures 16 June 2021 A woman and child examine life-size sculptures of a herd of Asian elephants set up by the Elephant Family and The Real Elephant Collective to help educate the public on the elephants and the ways in which humans can better protect the planets biodiversity, in Green Park, central London
AFP/Getty
UK news in pictures 15 June 2021 Hydrotherapists with Dixie, a seven-year-old Dachshund who is being treated for back problems common with the breed, in the hydrotherapy pool during a facility at Battersea Dogs and Cats Home's in Battersea, London, to view their new hydrotherapy centre
PA
UK news in pictures 14 June 2021 Scotland's David Marshall in the net after Czech Republic's Patrik Schick scored their second goal at Hampden Park
Reuters
UK news in pictures 13 June 2021 Raheem Sterling celebrates with Harry Kane after scoring England’s first goal of the Euro 2021 tournament in a match against Croatia at Wembley
Reuters
UK news in pictures 12 June 2021 Oxfam campaigners wearing costumes depicting G7 leaders pose for photographers on Swanpool Beach near Falmouth, Cornwall
EPA
UK news in pictures 11 June 2021 Members of the Vaxinol team, who are commercial, industrial and residential cleaners specialising in disinfection and decontamination, use electrostatic spray systems to deep clean the Only Fools Bar in Liverpool
PA
UK news in pictures 10 June 2021 A woman walks her dogs as the incoming tide begins to wash away the heads of G7 leaders drawn in the sand by activists on the beach at Newquay, Cornwall
AP
UK news in pictures 9 June 2021 Adam Chamberlain, 45, general manager of Big Tree pub in Sheffield, has put up over 500 flags, taking 36 hours, in preparation for Euro 2020, which kicks off this weekend
Tom Maddick / SWNS
UK news in pictures 8 June 2021
REUTERS
UK news in pictures 7 June 2021 A pedestrian wearing a face covering walks over Westminster Bridge near the Houses of Parliament in central London
AFP/Getty
UK news in pictures 6 June 2021 Isobel Salamon, founder of the Edinburgh Cinema Club, poses alongside the Leith Trainspotting murals in Quality Yard, Leith, Edinburgh, for the programme launch of the Cinescapes Festival which starts on July 4 with a Trainspotting 1 and 2 double bill
PA
UK news in pictures 5 June 2021 A long exposure photograph captures the rotation of the earth as the stars blur into circles over Knowlton church ruins in Dorset
Nick Lucas/SWNS
UK news in pictures 4 June 2021 Balloonists take flight during the opening of the Midlands Air Festival in Alcester, Warwickshire
PA
UK news in pictures 3 June 2021 Members of the Household Cavalry during the Major General's annual inspection of the Household Cavalry Mounted Regiment in Hyde Park, London
PA
UK news in pictures 2 June 2021 Hannah Vitos of the Blenheim Art Foundation, poses for a photograph next to artist Ai Weiwei's Gilded Cage (2017) sculpture in the grounds of Blenheim Palace in Woodstock, Britain
Reuters
UK news in pictures 1 June 2021 People swim in the Sky Pool, a transparent swimming pool bridge across two exclusive residential blocks standing next to the US Embassy in Nine Elms, in London, Tuesday, June 1, 2021
AP
UK news in pictures 31 May 2021 People enjoy the hot weather at Brighton beach
Reuters
UK news in pictures 30 May 2021 People venture into the sea as they enjoy themselves during a hot day on Brighton Beach
AP
UK news in pictures 29 May 2021 Swimmers at the Stonehaven Open Air Pool in Aberdeenshire, which reopens after lockdown restrictions were eased
PA
UK news in pictures 28 May 2021 Britain's Prime Minister Boris Johnson gestures as he meets Hungary's Prime Minister Viktor Orban at Downing Street in London
REUTERS
UK news in pictures 27 May 2021 White Pelicans in the sunshine in St James's Park, London
PA
UK news in pictures 26 May 2021 Boats are seen at Southsea Moorings in Portsmouth
Reuters
UK news in pictures 25 May 2021 York Glaziers Trust employees Kieran Muir (left) and Emily Price (right) remove a stained glass window panel at the start of a new five year, £5m project to conserve York Minster’s South East Transept and its medieval St Cuthbert Window
PA
UK news in pictures 24 May 2021 Dark rain clouds above an oast house at Bewl Water reservoir near Lamberhurst in Kent during one of the rainiest Mays on record, with the UK seeing 131 per cent of the usual month’s rainfall already
PA
UK news in pictures 23 May 2021 The Premier League trophy with the Manchester City club colour ribbons on, at Etihad Stadium, prior to the last Premier League match of the season. City will finally pick up the trophy after they won the league on 11 May
Getty
UK news in pictures 22 May 2021 Gary Kenny lifts the Buildbase FA Vase Trophy after Warrington Rylands won the FA Vase Final against Binfield at Wembley Stadium
Getty
UK news in pictures 21 May 2021 A family buffeted by the wind whilst crossing the the Millennium Bridge in London, with wind and rain forecast to ravage the UK on the first Friday that people have been allowed to meet in large groups outside in England
PA
UK news in pictures 20 May 2021 Devon And Cornwall Police Demonstrate Their Skills For Policing The G7 Summit
Getty Images
UK news in pictures 18 May 2021 An employee stands before a costume for the Queen of Hearts by Bob Crowley on display at the Alice: Curiouser and Curiouser exhibition at the Victoria and Albert Museum in London
PA
UK news in pictures 17 May 2021 Passengers prepare to board an easyJet flight to Faro, Portugal, at Gatwick Airport after the ban on international leisure travel for people in England was lifted following the further easing of lockdown restrictions in England
PA
UK news in pictures 16 May 2021 Emergency workers at the scene of a suspected gas explosion, in which a young child was killed and two people were seriously injured, on Mallowdale Ave Heysham which caused 2 houses to collapse and badly damaged another
PA
UK news in pictures 15 May 2021 Pro-Palestinian activists and supporters let off smoke flares, wave flags and carry placards during a demonstration in support of the Palestinian cause as violence escalates in the ongoing conflict with Israel, in central London
AFP via Getty
UK news in pictures 14 May 2021 Member of staffs tighten screws and paint a Marlin skeleton, before it goes on display at the Natural History Museum in London, as the museum prepares to reopen to the public on 17 May, following the further easing of lockdown restrictions in England
PA
UK news in pictures 13 May 2021 A worshipper at the Baitul Futuh Mosque in Mordon, south London, ahead of Eid al-Fitr. The celebration marks the end of the Muslim month of fasting, called Ramadan.
PA
UK news in pictures 12 May 2021 A couple have wedding photos taken in Westminster, London
Getty
Mr Hancock resigned on Saturday following revelations that he broke social distancing rules while having an extramarital affair with an aide.
The aide had also been appointed a non-executive director at Mr Hancock's department and was meant to scrutinise him.
There are also separate allegations swirling around whether Mr Hancock used a personal email address for official work – thought to be problematic for reasons of both security and scrutiny.