There are obvious signs you’re about to be terminated: You’ve had several poor performance reviews, you don’t get along with your supervisor, or your company is having financial difficulties. And some employees deserve to be let go: they may be unproductive, confrontational, dishonest, or abusive.

But many people who are shown the door are none of the above. They’re simply deemed “not a good fit” anymore. The company considers their skill sets not aligned with what they need for their positions. Being escorted out of the building clutching a cardboard box is the ultimate parade of shame. Devastated by rejection and left wondering what they did wrong, terminated employees enter the world of unemployment doubting their abilities and professional worth.

You should learn to read the writing on the wall and leave your job on your own terms, with a new, and hopefully better job before you get the boot. Here are 10 clues that your job might be on the line.

1. Your role has changed. If you find that your job duties or title have suddenly changed, it could be that your company is hinting it’s time for a change. Sometimes a new title comes with new duties, especially when a company or department is reorganizing.

While a title change not tied to a promotion might not be bad news in itself, it’s important to see the change in a larger context. Will your new title give you less authority than you had before? Will your new duties be suited to your experience and education? For example, a lateral movement from business development to operations might leave you uninspired or doing a job you’re not trained for.

Putting employees into roles they’re not familiar or comfortable with is rarely a mistake made by Human Resources departments. It’s a deliberate sink-or-swim approach to management. Worthwhile employees are expected to thrive when given new, and even unpleasant new duties. Employees who do not adapt well to these changes are then identified as disillusioned, which often precipitates their eventual departure. As a company reinvents itself, it’s HR’s job to retain only those employees they know will happily put up with whatever is thrown at them.

2. You’re considered old. Many employees identified as undesirable by employers are often “older” workers. As companies attempt to stay relevant, they know they have to stay ahead of the technology curve. Older workers often suffer because they aren’t deemed to be digitally savvy.

Past performance reviews don’t matter; one day the company considers your age and determines you’re obsolete. Now it’s the job of the company to build the case against you, implying that you’re suddenly not able to meet the expectations of your job.

Donna Ballman, a Florida employment lawyer describes the game:

“If, after years of great performance reviews, you’re getting reprimanded for things everyone does, or being nitpicked for things the company didn’t care about before, it’s possible that the company is gearing up for what I call the ‘suddenly stupid defense.’ They’re building a case to get rid of you for poor performance—trying to show a ‘legitimate reason’ other than age for firing you. If you’re being targeted for write-ups when younger employees do the same things and aren’t written up, you may have an age discrimination claim.”

But if you think it’s easy to sue for age discrimination, think again. It’s actually very tough for terminated employees to prove. In a 2009 case, the Supreme Court determined that workers have to prove age was the primary factor for dismissal rather than just one of the factors. Thus, it’s much harder to sue for age discrimination than it is for race and gender discrimination.

3. Your company offers employee buyouts. Companies offer employees buyout packages to encourage voluntary departures when the organization is looking to restructure or redefine its mission. Buyouts are structured as early retirement packages and are actually an expensive way for a company to entice long-term employees to leave. Thus, unlike layoffs, buyouts are typically offered by companies that are financially sound.

Corporations use buyouts as a tool to pare institutional memory and rid themselves of long-term employees they see as a hindrance to change. But the reasons go deeper then that. When a new management team takes over a company, employees with long organizational histories are seen as a challenge to management’s authority, which theoretically leads to morale problems.

If the company’s goal is to rid itself of its long-term employees, it’s not stopping there. Buyouts are the first step in a larger workplace purge and unfailingly precede targeted firings. Even if company makes their buyout quota, any employee that meets its criteria remains a target for dismissal.

So, if you qualify for a buyout that is offered by your company, you may want to consider taking it, according to financial adviser Roger Wohlner. It’s probably the best offer you’re going to get.

“If your company has identified you as somebody who might be a good candidate for a buyout offer this generally means you are on their list,” writes Wohlner. “I’ve invariably seen folks who have turned down the first offer finding themselves out of a job within a year or so.”

4. You’re given impossible duties and tasks. One of the most underhanded tactics companies use to fire their employees is to set them up for failure. All a supervisor needs to do is to give an assignment that is impossible to accomplish.

“If there was someone we no longer wanted at the company, we’d give him all the worst assignments on impossible deadlines, set him up to fail, and document that. After a few months, we could safely terminate him, ” says Cynthia Shapiro, former human resources executive and author of Corporate Confidential.

In this scenario, the employee is required to deliver on an immense project, but time and resources are purposely withheld. Alternatively, the employer gives the employee an easily accomplished task, only to sabotage the work. When it comes time for the employee’s review, that’s when the real bullying happens: The supervisor chastises the employee for the failure, leaving the employee a mess of self doubt, unable to justify their value.

Not only is this machination a form of corporate gaslighting used to break an employee’s spirit, it’s a form of workplace discipline that telegraphs a message to all employees: If management can coldly take out someone who had been highly regarded, anyone could be next.

5. You got a so-so performance review. It doesn’t take a trainwreck of a performance review to hasten your departure. One that’s simply not as good as the previous one gives a supervisor a case for firing that can be made to Human Resources. Even if a few sections that are typically marked “exceeds expectations” become “meets expectations,” that might just be enough for HR to justify a swift dismissal. Oftentimes, this type of firing is done to remove someone that is blocking the career path of an employee who's considered a rising star at a company.

Poor performance reviews are not required for companies to fire at-will employees. However, firing someone after a glowing review might raise red flags and leave the company exposed to a wrongful termination claim.

An unfairly poor performance review could be disputed by an employee and create ill feelings, not only between the supervisor and the employee, but throughout the workplace. To keep morale in check while a company prepares for an employee’s eventual departure, one mediocre performance review provides the company some cover.

6. You’re asked to train a colleague. Being an employee with specialized or proprietary skills is often a double-edged sword. On one hand, it makes you uniquely valuable at your workplace, but it can also be a hindrance to advancement. Unfortunately, some employers don’t invest in career development, leaving some employees stuck in their specialty roles.

Meanwhile, these same employers may view employees stuck in a dead-end job as complacent, with no sense of urgency and not motivated to compete, which puts their jobs at risk. Once you’re marked for termination, it dawns on them, they’ve actually got to replace you. So, after many years, if you find that your supervisor is asking you to train a co-worker, you probably won’t have that job for much longer.

7. Your boss ignores you. When your supervisor and other workplace managers ignore you, they’re hinting that they think you’re not a valuable employee. If it seems that your boss spends a lot of time with other employees while brushing you off, it’s a subliminal hint to the entire team that your days are numbered. This is easy to spot at meetings, as managers lean in and listen attentively when valued employees speak, while fidgeting and tuning out when disfavored employees take their turn. Beyond meeting brush-offs, managers often leave unwanted employees out of email loops, limit their participation in friendly workplace chats, or exclude them from after-hours social functions.

8. Your co-workers act oddly. Supervisors are often told by HR departments not to tell the coworkers about an employee’s imminent termination. However, they can’t often help themselves. And once workers know that someone is about to get canned, they typically avoid that person like the plague.

As a former editor at a New York-based publishing company says, “About a month before I was fired, the members of my team started to treat me differently. There were a lot of conversations behind closed doors, sorrowful glances, and nobody would sit with me during lunch. It was like kids shunning the dweeb in middle school. I should have known then.”

9. You have little to do. If you find your long-term assignments have been replaced by a few daily tasks, it likely means your supervisor is in the final stages of preparing for your departure and doesn’t want to leave a bunch of important projects up in the air after you leave. As soon as the long-term assignments stop coming your way, you should prepare for your inevitable firing.

When you find yourself looking for work to do, it’s time to brace for impact. However, this is definitely not the time to panic. Use the extra time to search for a new job. Take advantage of your workplace benefits, update your resume and visit a job recruiter.

10. You feel like you’re being spied on. HR consultant Laurie Ruettimann gives the straight dope on office spying: “You’re right to be paranoid. The company is always watching you, and there’s a record of everything you do: every phone call, every text, every tweet and instant message. At most companies, they save that data forever.”

It may not come to a surprise to you that your supervisor and HR department actively monitors your work activities at the workplace through keycards, surveillance cameras and your work-issued computers and phones.

However, once you’re targeted for termination, your employer may step up the spying, asking other employees about your conversations with them and monitoring your activities on social media after work hours. Such spying is not difficult to spot: The biggest clue is that parts of your conversations with others are repeated back to you. And you may hear comments from your employer about your personal life, which indicates you’re being monitored on social media.

You may also notice that items at your workstation seem to be moved or missing, your chair’s height has been reset, or there are items in your trash bin that you didn’t put there. In the spying end game, your employer is looking to leaf through or remove physical evidence. They might go through your notepad, desk calendar or files to see if you have any information they deem classified, can be damaging to the company, or can be used in your defense in a wrongful termination suit.