Agilent Technologies, the United States giant formed in 1999 as a spin-off of Hewlett Packard, had been looking to move to a smaller office after slashing staff numbers at its South Queensferry base. It had been considering sites outside of Edinburgh in what would have been a major blow to the city's economy.
But it has now confirmed that it will remain in the Capital after securing a long-term lease of an office at Edinburgh Park.
The decision to stay in Edinburgh came after talks with economic development leaders from the city council, who had made representations to keep the company in the city.
Paul Gourlay, Agilent's workplace services manager for West Europe, said: "Our company has a long and proud association with Edinburgh and we would like to place on record our appreciation of the positive engagement in this decision by the city council."
Agilent said that the existing office at South Queensferry was no longer fit for purpose.
It unveiled plans last summer to shrink its Edinburgh workforce from around 400 to between 170 and 180 by later this year. But despite the job losses it has always insisted it remained committed to keeping a presence in Scotland.
It has signed a 10-year lease for 4/5 Lochside Avenue at Edinburgh Park and it is expected that around 200 staff will move there.
Councillor Tom Buchanan, the city's economic development leader,
said: "This decision demonstrates that Edinburgh is well placed to emerge strongly from the recession. Agilent is exactly the kind of company that we are keen to encourage, and we are obviously delighted that the company has decided to stay."
Agilent, which has its HQ in California, works in the fields of life sciences, electronics and chemical analysis to research and create measurement instruments.