Production at Worcester fire engine manufacturer Carmichael has been saved just days before it was due to be outsourced to the Far East.
The 150-year old firm, which designs and manufactures bespoke fire tenders, had been due to transfer work to its parent company in Malaysia.
Rising costs were blamed for the switch to the Kuala Lumpur factory of Pesaka Astana, which bought Carmichael last November.
The end of production would have led to the loss of around 30 jobs at its factory in Weir-Lane although research and development and back office functions would have been retained in the UK.
But with some of the equipment packed and ready to be dispatched to the Far East, senior managers at Pesaka Astana had a change of heart.
Brian Wiggins, sales director at Carmichael, said: "We were only a few days away from moving our production to the Far East.
"We were never going to close down, but a lot of our manufacturing equipment was put in boxes and made ready for dispatch."
Carmichael, which employs 75 people at Worcester, produces around 40 fire engines per year, mainly for airports including Manchester, Bristol and East Midlands.
It makes 8x8 wheel trucks, which weigh up to 36 tonnes, and has customers across Africa, Europe, the Middle East and Far East.
The need to modify each vehicle to meet each country's fire regulations and practices safeguarded the manufacturing facility at Worcester, Mr Wiggins said.
He said: "The idea was to take some of the cost out of the manufacturing process by moving large elements of production to the Far East.
"But then it was realised this was going to be more difficult than it first appeared.
"Each of our trucks is produced to order with a high degree of customisation in them which means they cannot just be produced off a photocopied design.
"For example in Europe it is the custom to have the pump powered by a separate engine, while in the UK it runs from the vehicle's main engine and is controlled through a clutch.
"Plus, our staff are very highly skilled and flexible and can work on a variety of processes. This is not so easy to replicate." Mr Wiggins said there were also concerns about the price of shipping the fire engines around the world from a base in Malaysia rather than the UK.
"There were several disadvantages which had to be overcome before savings could be made from the switch.
"It was decided this was not the right thing to do, so production is staying in the UK. But it was a very close thing; we had some equipment packed and ready to be transported. If production had gone, we would have lost 30 to 40 workers."
He said the company was now looking at other ways to improve competitiveness. It was also seeking to increase sales to £14 million this year, a figure which Mr Wiggins said was a "substantial" increase on previous years.
"The order book is is looking good and we are filling to the back of next year. This is good news for manufacturing, and we are pleased we are staying in Worcester."