Boris Johnson was met with jeers and calls of "traitor" as he visited a flood-struck community in the West Midlands after weeks of criticism over his absence at some of the worst-hit sites across the UK.

Mr Johnson had previously been accused of being a “part-time PM” after deciding not to visit a number of towns and villages across Wales and England that were affected by the wettest February on record.

Now he has met with Environment Agency officials who worked to keep waters at bay in Bewdley, Worcestershire, after the town was inundated by the River Severn last month, forcing people to flee their homes.

At least one onlooker shouted “traitor” at Mr Johnson, who was also seen shaking the hands of residents as he passed through the town while joking he would “get Bewdley done”. Some residents booed Mr Johnson, while others asked why he had waited until now to show up.

It comes after Mr Johnson was repeatedly admonished for failing to visit those who had been flooded out of their homes, despite doing so on the campaign trail in November when he met with angry residents of the Yorkshire village of Fishlake.

Storm Dennis in pictures Show all 40 1 /40 Storm Dennis in pictures Storm Dennis in pictures Flood water surrounds Upton upon Severn in Worcestershire. Severe flood warnings remain in place in the wake of Storm Dennis, with more rain expected to fall in the week PA Storm Dennis in pictures A husky and its owner are rescued by emergency services after flooding in Nantgarw, Wales after Storm Dennis hit the UK PA Storm Dennis in pictures Waves crash against the harbour wall in Isle of Whithorn Getty Storm Dennis in pictures An employee cleans a nail salon on Market street in Pontypridd after Storm Dennis hits the UK leading to widespread flooding PA Storm Dennis in pictures Flooding from the River Wye Getty Storm Dennis in pictures Laura Court and Louise Bedgood mop up the floor of Lougos hair dressers in Oxford Street, Nantgarw EPA Storm Dennis in pictures A Land Rover wades through flooded roads in the Wye Valley, near the hamlet of Wellesley in Hereford Getty Storm Dennis in pictures A rainbow appears over flooded fields in the Wye Valley Getty Storm Dennis in pictures A firefighter carries a dog to safety as part of ongoing rescue operations due to flooding in Nantgarw PA Storm Dennis in pictures Two men cleaning up the street in Pontypridd PA Storm Dennis in pictures Rescue operations continue after flooding in Nantgarw PA Storm Dennis in pictures Flood water surrounds Upton upon Severn PA Storm Dennis in pictures Members of the public start the clean up following flooding from storm Dennis in Newcastleton, Scotland Getty Images Storm Dennis in pictures Local residents remain cheerful as walk through receding floodwater in Mountain Ash, Wales PA Storm Dennis in pictures A car trapped by debris carried by floodwater, on the road outside the Aberdare Hotel in Mountain Ash, Wales PA Storm Dennis in pictures Flood water surrounds Upton upon Severn PA Storm Dennis in pictures Flood water surrounds abandoned cars left in a flooded street in Tenbury Wells, after the River Teme burst its banks in western England AFP via Getty Storm Dennis in pictures A man rescues a floating plant pot from flood water, outside of a flood-bound house in Tenbury Wells AFP via Getty Storm Dennis in pictures Items float in flood water inside a flooded charity shop in Tenbury Wells AFP via Getty Storm Dennis in pictures Flood damage in Bridge Street, Crickhowell, South Wales Reuters Storm Dennis in pictures A digger is used to clear debris, carried by floodwater, from the road outside the Aberdare Hotel PA Storm Dennis in pictures Flood water surrounds abandoned cars left in a flooded street in Tenbury Wells AFP via Getty Storm Dennis in pictures An Environmental Agency Officer gives a briefing as the River Ouse in York continues to rise potentially causing further flooding as Storm Dennis causes disruption across the country Getty Storm Dennis in pictures A man walks through a flooded convenience store in Tenbury Wells AFP via Getty Storm Dennis in pictures Flood water surrounds abandoned cars left in a flooded street in Tenbury Wells AFP via Getty Storm Dennis in pictures Employees of York City Council use sand bags to increase flood defences Getty Storm Dennis in pictures A van is driven through standing water on a road in Tenbury Wells AFP via Getty Storm Dennis in pictures A footbridge in Pontypridd is blocked by debris after Storm Dennis hit the UK PA Storm Dennis in pictures Waves crash over the lighthouse at Porthcawl, South Wales Reuters Storm Dennis in pictures Members of the 4th Battalion Royal Regiment of Scotland erect flood barricades in Ilkley, West Yorkshire AFP via Getty Storm Dennis in pictures Bricks and debris cover damaged cars after part of a building collapsed in Herne Bay AFP via Getty Images Storm Dennis in pictures An empty coach sits abandoned in flood water after the River Teme burst its banks near Lindridge AFP via Getty Images Storm Dennis in pictures Standing water on a road in Tenbury Wells AFP via Getty Storm Dennis in pictures A firefighter carries a dog to safety as part of ongoing rescue operations due to flooding in Nantgarw PA Storm Dennis in pictures A rescue boat is lifted from the water by Mountain Rescue crews after a river patrol on the River Ouse in York Getty Images Storm Dennis in pictures Flood water surrounds grave stones in a graveyard in Tenbury Wells AFP via Getty Images Storm Dennis in pictures One-year-old Blake is carried by a rescue worker as emergency services continue to take families to safety PA Storm Dennis in pictures A dog and its owner are rescued by emergency services after flooding in Nantgarw PA Storm Dennis in pictures A car passes over Teston Bridge near Maidstone in Kent PA Storm Dennis in pictures An aerial view of the Welsh village of Crickhowell which has been cut off Getty Images

Speaking to the Commons in February, Jeremy Corbyn castigated the prime minister for not having called a Cobra meeting sooner, and questioned his motives for visiting Fishlake.

“Is he just pretending to care when he doesn’t really care at all because there’s no votes on the line at this moment?” Mr Corbyn said.

Labelling Mr Johnson a PM who “often goes awol”, the opposition leader added: “Does the prime minister agree with the Conservative leader of Derbyshire county council that he’s turned his back on the people affected by the floods?”

Mr Johnson insisted there had been “constant stream of ministerial activity”, later telling ITV’s This Morning: “[The emergency services] said to us: ‘All you’ll do is distract us and disrupt the business of helping people with the immediate crisis.’

“So what I was doing was directing operations … Obviously, I’m working around the clock on various things, as indeed is the government.”

Speaking on the banks of the Severn where he viewed flood defences, he added that his presence could hamper efforts to help people. "What they have to do is then break off and gold command has to find somewhere to brief you, everybody has to gather. They're diverting from their work for hours and hours,” he said.

Some Bewdley residents, however, said they were "just glad to see him here eventually" and greeted him warmly, with a crowd stopping him to ask for photos. But as he posed for selfies on a bridge in the town, one passerby told him to “do your f***ing job”.

Mr Johnson said he had discussed “the business case” for putting in permanent flood defences while speaking with the Environment Agency during his visit.

His visit came hours after Rishi Sunak, the new chancellor, confirmed this week's budget would include £5.2bn for flood defences between 2015 and 2021, double the previous commitment of £2.6bn.

He is expected to tell MPs this funding will be used to build 2,000 new flood and coastal defences, protecting 336,000 homes.

In February, the government also pledged to spend £1.2bn on "the world’s most powerful weather and climate supercomputer" to help forecast and prepare for extreme weather events, such as the record rainfall that caused last month's severe floods.

Mr Johnson's absence previously threatened to overshadow the announcement of £500 council tax breaks and additional hardship relief for some of those affected by the flooding, leading Labour to brand the funding a "desperate PR exercise".

It came after Derbyshire county council leader Barry Lewis – as referenced in Mr Corbyn's Commons speech – accused the government of refusing to pay for any of the £20m repairs needed after November's floods.

“We are not very happy," Mr Lewis said in February. "You can’t give local authorities the clear message you are going to support them and then turn your back on them.”