The government is willing to take a 25% stake in a buyout of Tata Steel's UK operations if needed, business secretary Sajid Javid has said.

The Department for Business, Innovation & Skills said it was preparing a package "worth hundreds of millions of pounds" to support a possible deal.

Mr Javid said the money would only be available if it was commercially viable, and added that the government would not play any part in the running of the business.

The UK and Welsh governments also said they would be willing to consider grand funding as additional support for a buyout.

David Cameron's spokesperson said: "We would work alongside a potential buyer to make sure that the government is doing what it could to support a viable sale.

"If we were to take an extra stake it would be a minority one with the aim of supporting the purchaser in delivering a long-term future for the business, we are certainly not seeking to be controlling the company."

She added: "I am not sure we would accept the concept of part-nationalisation. We will be investing on a commercial basis. We would not see this as nationalisation. We would not be seeking to acquire a control in the business. We don't think that nationalisation is the right answer."

Gareth Stace, director of UK Steel, said: "We have been calling for government to step up to the mark and provide this type of financial commitment and backing.

"We are not yet out of the woods however. Further action is still needed on energy costs and business rates whilst at EU level, we still need to see tougher action on the dumping of cheap imports. This will then provide the level playing field which will give UK companies a fighting chance to compete."

So far, just two parties have made their interest public - Sanjeev Gupta, head of commodities firm Liberty House, and Steve Wilkie, the boss of Tata's Port Talbot plant, is proposing a management buyout.

Following another meeting with Tata's board in India, Sajid Javid said there had been good progress on the sale.