Before you turn in your resignation, learn what your employer can and can’t do when you resign—and how to protect yourself if you’re asked to leave.

When Can a Company Fire You After You Give Notice?

In most cases, an employer can fire you and stop paying you immediately after you give notice. That’s because most U.S. workers are employed at will. This means that the company can terminate your employment at any time, for any reason—or no reason at all—provided that they’re not discriminating against you. However, not everyone is employed at will. If you’re covered by an employment contract or union agreement, you may have protections in this situation. Some state laws include exceptions to employment-at-will policies, as well.

How to Protect Yourself

Just because a company can fire you after you give notice doesn’t mean that they will—but it’s best to be prepared for the possibilities. Here’s how:

Know Company Policy

Check your company’s employee handbook for policies about giving notice. You may find that your employer has a policy of honoring notice by allowing workers to finish out their last weeks of work. Why do some employers have this policy? In short, they’re hoping to protect their employer brand. It’s difficult to attract new employees if an organization has a reputation for treating departing workers shabbily. Employers also want to avoid antagonizing workers who might retaliate by sharing proprietary information with their competitors. In addition, employers often want to keep the services provided by departing workers in place as long as possible to avoid disruptions or burdens to other staff. The two weeks of notice gives them time to start interviewing replacements, gather details on any ongoing projects, and transition work over to other employees temporarily.

Have a Budget in Place

Ideally, you should have a plan to cover expenses if you’re asked to leave right away. In some cases, you may be eligible for unemployment if they do fire you after you quit—another reason why many employers will avoid that situation. Sometimes, companies will say that you are no longer needed after the date when you submit your resignation. They aren’t firing you after you quit, but they don’t want or need you to continue working. Typically, they will pay for the time when you would have been working, but they aren’t obligated to.

Tie Up Loose Ends

Be prepared to leave the premises immediately once you give notice. While most employers will permit you to go back to your desk, and clear your computer and pack your things, they don’t have to. There is a possibility that you will be escorted out of the building without a stop back at your desk. Just in case this happens, be sure to remove any personal email or documents from your work computer prior to resigning. Clear your browser history and remove any stored passwords. Do the same thing on any mobile device or tablet that you have through work, and be prepared to hand it over on the spot. Keep copies of any materials which you might include in your portfolio or that might be useful in future jobs, since your computer access might be cut off right away. If some of your work for the company is online, take screenshots or save each page as a PDF so that you can include it in your portfolio if your former employer makes changes at a later date. Make sure you have contact information for any co-workers or clients you want to keep in touch with and pack up any precious personal items, such as photos.

Prepare to Explain the Transition

Hopefully, the reason you decided to give quit was that you had a new job lined up. Still, when you leave a company, you want to make sure that you maintain a good relationship with your supervisor and colleagues when you can. Be ready to explain to potential employers why you left the position. Regardless of the circumstances of your departure, you should stay positive when discussing the job and the company. Remember that you’ll be judged by your behavior. If you speak ill of your former boss or co-workers, your new team might assume that you were the problem.

When Should You Skip Giving Notice?

Giving two weeks’ notice is the standard practice, and in most cases, providing it helps to ensure a good relationship with an employer. However, there are some good reasons to skip giving notice. If it’s typical for your employer to ask people to leave immediately, and not pay for the two-week period, you could wind up in a tough financial situation. Under these circumstances, you might want to consider quitting without notice. The information contained in this article is not legal advice and is not a substitute for such advice. State and federal laws change frequently, and the information in this article may not reflect your own state’s laws or the most recent changes to the law.