A senior adviser to Boris Johnson was involved in trying to stop the media reporting images of a four-year-old boy photographed sleeping on a hospital floor.

The Conservative aide contacted the press regulator Ipso on behalf of Sarah Williment, the mother of the boy, after the health secretary, Matt Hancock, spoke to her by phone, according to individuals with knowledge of the case.

The regulator then issued a notice asking the press to not name the boy or use the photograph, which had previously been widely used.

It is highly unusual for a political party to send a complaint to the press regulator on behalf of an individual and seemed designed to try to limit reporting of the row. The image had become one of the defining photos of the final week of the campaign.

A Conservative party source confirmed that a senior Tory adviser had sent the letter to the press regulator on behalf of Williment because she “wasn’t happy with the excessive coverage of the incident”.

The unusual intervention, first reported by BuzzFeed News, was made as the Conservatives struggled to contain the row over the photograph. Pictures of the child on the floor at Leeds General Infirmary were published initially in the Yorkshire Post and followed up by the Daily Mirror.

On Monday, Johnson had grabbed a reporter’s phone and put it in his pocket when he was confronted with the photograph.

Hancock was then sent to the hospital in an attempt to bring the story under control. During his visit, Tory sources said he spoke to Williment over the phone. Another aide approached journalists about the story on Monday afternoon, warning them to consult with their news desks before following up the story.

In an apparent bid to silence other news outlets from following up on the story one of the prime minister’s most senior aides contacted Ipso, saying they were acting on behalf of Williment.

The aide also sent the letter to the BBC, which reported extracts of it, claiming the story was “causing significant distress” to the boy and his family.