Boris Johnson has promised to give elected mayors in the north of England “London-style” powers to take control of their railways, in a speech interrupted by a heckler who told him to get back to parliament to “sort out the mess you created”.

Johnson said mayors would be given generous budgets in order to run their own local railways, in a similar way as he was able to take control of the overground in London when he was mayor.

Mayors “are always going to care far more about their trains and trams than someone in Whitehall”, he told the Convention of the North, a conference organised by the NP11, which represents the north’s 11 local enterprise partnerships. “Only local champions can really make a difference to their local towns and communities,” he said.

The event took place at the Magna science centre in Rotherham. Johnson was taken to task by a reporter from the local newspaper for his remarks on LBC radio about police forces “spaffing money up the wall” investigating historical child abuse allegations. “Is that something you still believe in relation to historic investigations of CSE [child sexual exploitation]?” the Rotherham Advertiser reporter asked.

Johnson appeared to deny making the remarks, despite them being recorded and broadcast on LBC. “That’s actually not what I said,” he replied. “All such investigations are extremely important and the point I was making is we do need to be backing police to be fighting crime.”

The National Crime Agency has more than 200 people investigating allegations of child sexual exploitation in Rotherham, making it the largest such inquiry in the UK. It had a budget last year of just under £12m and is seeking to increase this as it works toward recruiting a staff of 250.

Johnson was heckled during his speech by a member of the public when he said that as a former mayor he understood the power of “local, accountable leadership to sort out what matters most to local people”.

“Like our MPs, Boris … Maybe get back to parliament … sort out the mess you created,” yelled a man from the back of the hall, shortly before being ejected by security guards.

Johnson was also confronted by a woman in Doncaster. “People have died because of austerity and you’ve got the cheek to come here and tell us austerity is over and it’s all good now, we’re going to leave the EU and everything’s going to be great,” she said. “It’s just a fairytale.”

Johnson said the north of England was poorly served by trains compared with London, and noted that it had taken him just over an hour and a half to get to Doncaster from London on Friday morning.

“But if, for example, you travelled from Liverpool to Rotherham, less than half the distance, you might have had to leave an hour earlier than me and change as many as three times,” he said.

“Your journey may have been on two and three-carriage trains, some of them built in the early 1980s with a body designed for a bus with bus seats too. I love buses but not when they are supposed to be trains. It’s time for the north to run its own trains.”

Johnson promised greater control over fares, service patterns, rolling stock and stations on local lines in metropolitan areas, and opportunities for rural communities to own their own lines.

Mayors such as Andy Burnham in Greater Manchester have long demanded change in the way railways in their areas are managed. After the speech, Burnham said the pledge would allow him to create “GM Rail” to connect better with the bus and tram network in the city, as Transport for London was able to in the capital.

“It is what we have been calling for, but we have got to make sure it comes with the funding that we will need and all of the powers we need,” he said.

Johnson promised the mayors that the government would “be generous on capital spending, but we won’t be able to afford everything everyone wants, so choices will have to be made”.

He said they might have to raise some of their own funds, but it was unclear whether they would do this by increasing council tax or fares. Burnham repeated his call for “London-style subsidies” for rail, bus and tram passengers in the north.

Steve Rotheram, the mayor of the Liverpool city region, who already controls Merseyrail, the most punctual line in England, said he also welcomed the idea but needed to be sure the government would provide the necessary indemnification in case of major infrastructure failure.

“If we had a major tunnel collapse for example, that would bankrupt the whole city region if we had to fix it,” he said.

Johnson told the mayors: “As you have asked, we will give you far greater control over your budgets. But as well as power, you have to take responsibility. That means alongside taking the credit you will have to take the heat, just like the mayor has to do in London. No one blames the government for the problems on the Central line. They blame the mayor.”