If you have ever been asked uncomfortable questions by an employer during a job interview, you may have wondered if those queries were, in fact, illegal. You may be surprised to learn that, in all probability, they were not.

Federal and state laws protect job applicants from discrimination on the basis of race, religion, disability, sex, and age, for example. Except in the area of disability, these protections don't extend to questions asked during a job interview – they do, however, prohibit an employer from denying a job to someone based on any of the aforementioned criteria. 

For example, if a hiring manager asks you if you plan to have children and you say yes, discrimination would be suspected only if you don't get the job.

Although federal law does not make certain interview questions illegal, the wording of specific questions can be construed as discriminatory in nature, making them violations of federal Equal Employment Opportunity laws.

If this sounds confusing, it is. If you are in the market for a new job, it is important for you to understand how the law works, and how it can protect you. In a nutshell, employers can ask questions about certain issues, such as those listed above, only if the answers pertain directly to the position to which you are applying.

Knowing about work discrimination laws may help you field some awkward questions during your next interview. While most employers are probably savvy enough to avoid blatantly discriminatory lines of questioning, some inquiries can come very close.

According to the U.S. Equal Employment Opportunity Commission, the only time an employer could conceivably request information about your race is for affirmative action purposes. Even then, these queries should be part of the written application form, and separated from qualifications and other actual job-related information. 

Unless related to the duties of the job, no interviewer should ask you about your religion. Therefore, religious entities may ask this question, but non-religious employers may not.

Sex or gender
Queries regarding marital status, pregnancy, or children would certainly be construed as discriminatory if the applicant was denied employment and was otherwise qualified. Employers may ask only work-related questions, such as whether you will be able to work late or travel for work purposes. 

Employers may not directly ask your age, although they may ascertain that you are of legal age to work. The main concern of the Age Discrimination in Employment Act is to make sure applicants are not unfairly denied employment because they are 40 years of age, or older.

Employers may not ask about an applicant's health, medical history, or disability – period. If certain tasks are necessary for the execution of the position's duties, the employer may ask specifically if the applicant will be able to perform those tasks. Under no circumstances may queries be made about the nature of a disability, but there may be discussion regarding reasonable accommodation if the employer feels that this may be necessary.

Handling discriminatory queries
How should you respond if faced with potentially discriminatory interview questions? There are limited options, all of which will likely add to an already tense situation. For instance, you can ask how the query ties in with the duties of the position, answer directly, or evade the question entirely.

If you feel that you have been discriminated against, you will need to file charges with the EEOC. Except in cases of pay discrimination, this step is essential if you think you might file a lawsuit at a later date.

Job discrimination is against the law, but may be hard to prove. Being aware of what is acceptable questioning by hiring authorities can help you determine whether or not the intent to discriminate exists – and assist you with documenting your case if you feel you have been victimized.

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.