The arrival of the robotic arm was not a happy affair at Professional Finishing in Richmond, California, just across the bay from San Francisco. In contrast to the hulking factory arms that have traditionally labored in isolation, this robot was meant to work right alongside humans, delicately sanding and painting things like speaker cases or cabinets for medical devices. Which sounded a lot like a first step toward replacing the company’s workers altogether.

“We did have one employee tell us, ‘Hey let me know when the robot’s up and running and I'll just quit,’” says Professional Finishing co-owner Dawn White. “We said, just bear with us. Watch what happens. Help us and everybody will keep their jobs.”

Everyone did indeed keep their jobs. Today, three of these machines from Universal Robots handle the brute sanding and painting, while humans handle more complicated tasks like assembly. Some of these workers even turned into robot technicians. It’s called collaborative robotics, and it’s popping up all over the place, thanks to advanced machines that sense when they’ve contacted a person and stop, as opposed to launching them across the room.

Like many companies, Professional Finishing moved into robotics as a matter of economics. Just months after purchasing the business in 2013, Dawn White and her husband Chad learned that the minimum wage would jump from $9 an hour to $15 by 2020. Which is great for workers—don’t get me wrong—but certainly complicates matters for a finishing company that’s competing with cheap labor abroad.

“It was a matter of survival for us,” says Dawn. “We would have closed in less than two years if we had not brought in the robots. Everyone here would have lost their jobs.”

So 10 months after purchasing the company, the Whites hired their first robot painter, which increased the productivity of the human laborers by a factor of four. And bonus: those humans' jobs got a lot easier. “The operator would have to do a lot of bending, crouching, lifting the part, twisting, just all day long,” says Chad. “The robot now does all that for them. And now the the operators who used to paint these parts are now actually running the robot.”

Which of course required some adaptation on the part of the humans. “The robot made me nervous, I thought it was going to lead to layoffs,” says painter Eric Magallon, who now works as a robot operator, making sure it's loaded with enough paint and the like. “But when we started working with the robot it became normal. We got used to it.”

You are more likely to work with a robot than have one replace you in the near future. Because while robots are great at repetitive tasks, humans still beat them at delicate, complex jobs. “We think more jobs will change their activities than completely disappear, and so we'll see more of these collaborations between machines and people,” says Michael Chui, a partner at McKinsey Global Institute and co-author of a recent report on automation. “When you actually have a robot next to a person or artificial intelligence next to to a person and they work better together to produce higher quality products than any one of them working alone.”

The machines aren’t so much stealing jobs en masse as they are taking over parts of jobs. Professional Finishing’s workers don’t have to do all that crouching and twisting anymore, but they do have look after the machines and handle more sensitive tasks. A desk job is no different: Think how much time you save and productivity you gain by using a simple word processor instead of a typewriter.

Inevitably, though, the machines will grow ever more sophisticated and take more jobs outright. They’ll get better at manipulation and planning, and humans will fall out of the loop. “The trick is, can we get those people who are displaced by automation retrained and able to transition into the jobs of the future?” Chui asks.

It worked for Professional Finishing—robots have not only made workers more productive, but you could argue that the machines saved those jobs altogether by helping the company compete in a tough market. And bonus: the robots are physically incapable of launching employees across the room. Singularity averted, at least for the time being.