Sometimes, even the most diligent, experienced workers wind up falling victim to layoffs. Even if you're a strong employee with a solid track record, if your company experiences financial trouble or gets acquired by another business, you could find yourself out of a job. The same holds true if the economy in general takes a turn for the worse. In fact, 20% of the workforce got laid off between 2009 and 2014 following the country's most recent recession.

But despite the fact that layoffs are often inevitable, there are things you can do to lower your chances of landing among the downsized. Here are a few to start with.

A woman with her head down on a desk

IMAGE SOURCE: GETTY IMAGES.

1. Be that person who volunteers

Companies like to see employees take initiative and go above and beyond. So if you're that person on your team who's often volunteering to lead new projects, head up presentations, and interface with other departments, it could be just the thing that keeps your name off that layoff list.

Of course, you don't want to go overboard, either. If you volunteer for too many things, you might stretch yourself too thin, which, in turn, could negatively impact your performance and career. But if you grab the lead just enough, you'll show your manager that you're a take-charge, results-driven worker his or her team can't easily live without.

2. Maintain a positive attitude

You can study accounting, or learn how to program in certain languages. But portraying a positive attitude isn't the sort of skill you can acquire in college or at a training course. Rather, it's something a lot of folks need to work on in order to pull off.

On the other hand, if you do gain a reputation as that employee with the can-do attitude and confident outlook, it'll go a long way toward helping you keep your job. Remember, you may not be the only person at your company who knows how to use your internal sales database; but if you're that worker who never gets flustered when that database goes down, you'll be sure to stand out.

3. Expand your skill set

Companies tend to have a hard time letting go of employees who provide extra value. So if you work on growing your skill set, you'll be more likely to survive the next batch of layoffs that hits your company.

Even if it costs you some money, it pays to take courses, get your certifications, and attend industry conferences on your own time and dollar. It's also a good idea to spend some time shadowing colleagues in other departments and learning more about what they do. The more cross-functional an employee you are, the easier it'll be to make a case for keeping you around long term.

4. Have a unique skill no one else in your company has

Though expanding your knowledge base is a crucial part of establishing some job security, you'll be doing yourself an even bigger favor by honing one specific skill that no one else in your company can boast. This might mean mastering a certain software that none of the other IT folks know how to use or bolstering your graphic design skills so that your work clearly outshines everyone else's. While being a well-rounded employee will help you keep your job, if it's a known fact that you're the only one at your company capable of performing certain tasks (or doing them well), that's sure to buy you some staying power.

5. Build relationships with other teams and managers

Just because you don't work with a certain team all that frequently doesn't mean you shouldn't establish a strong rapport with its manager. Similarly, if there's a team that's been begging to work with yours, become that liaison, even if you're technically not the one in charge. The more people at your company who have good things to say about you, the better your chances of sticking around if layoffs come to be.

If you're not sure how to kick-start these new relationships, start slowly. Approach a coworker on your level and ask if his or her team could use your team's support. From there, ask to be introduced to that person's manager and set up an informal meeting to discuss some mutual goals. Oh, and bring coffee, doughnuts, or something else that might buy you an added dose of goodwill. Seriously. It never hurts.

Of course, there's a chance you might do all of these things and still wind up on the wrong end of a layoff anyway. And that's no doubt unfortunate. But in many cases, adhering to these tips will give you a healthy dose of protection should your company end up having to let people go.

The Motley Fool has a disclosure policy.