Tech companies have begun investing huge amounts of money to help in the fight against extremism.

Facebook, Google, Microsoft and Twitter are directly funding an increasing number of projects, not just online, but in local communities.

Sky News has been told the investment, aimed at countering propaganda from terror groups like ISIS, currently tops more than £100m and is separate to the many millions already invested in policing and removing extremist content online.

It comes at a time of fierce criticism from politicians that the tech sector is not doing enough to deal with extremist content online.

Richard Allan - Facebook's Vice President of Policy for Europe, the Middle East and Africa - said their investment in counter-extremism projects was not a reaction to that criticism, but signalled a more profound shift in thinking from companies like his.

"Historically I think there was a sense that internet companies would say, 'look we're not responsible for anything that happens on our platform'.

"That has shifted… and I think that is the long-term status now. I don't think we're going to go back to the days where the internet companies say, 'not my problem'. The fact is, it's all our problem."

Video:Tech companies take on extremism

Facebook is investing many millions, not simply in technology to isolate and remove terrorist content, but directly funding community organisations so they can respond to extremist material with their own counter narrative.

Richard Allan said a key plank of that is based around Facebook's Online Civil Courage Initiative: "Some of the more unpleasant elements in society have learned to abuse all forms of internet services.

"What we want to do with this initiative is make sure that those who are trying to use our services to do good and counter that abuse, have the equal skills and resources.

"For us to invest in that directly, makes absolute sense."

Many internet companies are now working alongside counter-extremism experts, like those at the Institute for Strategic Dialogue.

The ISD is currently managing part of a multi-million pound global fund on behalf of Google, helping select worthwhile community projects in the UK to invest in.

The Institute's director, Sasha Havlicek, said: "We're very excited about this development, because for about seven years we've been saying we desperately need to equip civil society to compete proportionately and effectively with the propaganda machinery of extremist groups.

Video:Rudd: 'Not safe' for online to be dark

"The extremists are really sophisticated and they're very effective. They've been using all the tools in the tool kit. But on our side, on the civic side of this, we haven't, so this is an opportunity to start to do that."

For many UK based counter-extremism charities, the intervention by the tech sector is a lifeline.

The Active Change Foundation, in east London, lost its Home Office funding more than a year ago.

The charity's youth centre in Walthamstow and most of its programmes have closed down.

But a £190,000 grant from Google has kept a few of the projects going.

The charity's founder, Hanif Qadir, said the tech companies' involvement was very welcome, but that the Government should not use that as an excuse to pull investment from projects like his.

"Countering extremism is a resource intensive programme, especially if you're going to do it effectively, because you have to engage in all levels of community and that can only really be funded by the Government," said Mr Qadir.

"All praise to the tech companies which have stepped in. If it wasn't for Google, we'd have been finished a year ago. But it is a sticking plaster and sustained government funding is really what we need."

The funding of community projects is being matched by investment in technology advances.

Developments like Redirect send anti-extremism messaging to those searching for IS (Islamic State) on Google and YouTube.

Redirect's developer, Yasmin Green, from the tech developer Jigsaw, travelled to the Middle East to interview former IS members to gain insight into the types of propaganda that hooked them in the first place.

She acknowledges the risks involved in speaking directly to those who had been radicalised, but says tech companies were increasingly determined to do more to tackle extremism.

"I can tell you as a tech insider - and I've been at Google for 11 years, studying radicalisation on the internet for seven of those years, things have really changed in terms of how much the tech companies are doing to go after violent extremism.

"The resources involved in everything, from working with NGOs, to going to visit thousands of schools in many countries are intensive.

"Embarking on outreach programmes at a very local level is something very new when it comes to the responsibility that tech companies are taking to tackle extremism."

The tech sector's investment of many millions of pounds will not end the criticism from politicians, who have been particularly vocal in the wake of the recent terrorist attacks in London and Manchester.

But those within the sector that Sky News has spoken to say that investment will continue to grow and that they are in the fight against extremism for the long term.