Everybody hates the idea of being laid off, but if it has to happen, many workers say the would prefer if a robot took their place.

The Brookings Institution estimate that 36 million Americans are working jobs with a “high exposure” to automation, meaning a machine could handle at least 70% of the job. Food service, short-haul transportation and clerical office work were some of the jobs at risk.

Last month, Amazon said it would spend $700 million to retrain one-third of its American workforce, about 100,000 people, by 2025. The online retail giant says it’s a serious investment in its workforce, but labor union critics contend that Amazon AMZN, +2.01%  “wants to automate every good job out of existence.”

60% of participants said they’d prefer to be replaced by a robot, not a human.

A study released this week of 2,000 people by researchers at the Technical University of Munich and Erasmus University in Rotterdam is putting a twist on people’s fears of automation that are creeping into the workplace. When participants were asked if they wanted a human or a robot to take their job, 60% of participants said they’d actually prefer to be replaced by a robot instead of a human being. In fact, they felt the same way about being replaced by artificial intelligence.

And yet another part of the study gauged reactions to a theoretical firm that costs either with replacement employees or robots: 67% opted for new employees. They want people to have jobs, just not if one of them is filling their role if they get fired.

The researchers have a simple explanation: Ego.

‘We just have this egocentric viewpoint that I’m irreplaceable.’

—Daren Martin, CEO and founder of the Global Company Culture Association

Daren Martin, chief executive and founder of the Global Company Culture Association, a company bringing together business leaders to focus on workplace culture, told MarketWatch he wasn’t surprised. The study might be grappling with new questions about automation, but the results revealed a “basic human character,” he said.

“We just have this egocentric viewpoint that I’m irreplaceable,” which leads people to think if something will take over it would have to be a machine instead of a person, said Martin.

Martin is also an executive coach and will ask business people to rate their performance and then rate their colleagues’ work. Around 95% of the time, people will rate themselves higher than their colleagues.

Don’t miss: How AI is catching people who cheat on their diets, job searches and college work

Automation won’t be “a sudden robot takeover but a period of ongoing and, perhaps, accelerated change in how work is organized and the mix of jobs in the economy,” according to a McKinsey & Company report last month. Even if some jobs disappear, the consulting firm said new jobs will appear for workers who can adapt.

A worker’s hi-tech transformation may not be drama free. In June, 43% of mangers told Robert Half International RHI, +0.93%, the global staffing agency, that worker resistance to change is the top barrier to adapting new technologies.

Other researchers have been exploring how humans feel about vying with robots — and those results might contradict the conclusions that people can brush off losing to an advanced technology adversary.

One recent Cornell University experiment pitted robots against humans in games for cash prizes.

The humans stopped trying hard and grew to dislike the machine that kept on winning. “I felt very stressed competing with the robot,” said one participant. “In some rounds, I kept seeing the robot’s score increasing out of the corner of my eye, which was extremely nerve-racking.”