united-states illinois
Is it legal for a cop to ask for my ID if he pulled up to me when I&#39;m checking my car
<p>I thought I could smell something burning while driving so I pulled over and popped the hood of my car. I was checking my engine when a police officer pulled up. He had me drive over to a parking lot. When we were there I  popped my hood and got out to continue checking and he asked for my license. Is that legal? It happened in Illinois.</p>

<p>In most states, if you had said <em>"Am I being detained, or am I free to go?"</em> and the answer is <em>"you are free to go"</em>, then you do not have to provide ID. In Illinois it can become more complicated, the Criminal Code of 1961 does not impose a duty for a suspect to identify themselves and cannot be charged of obstructing a police officer for refusing to identify themselves or refusing to provide identification. </p>

<p>In Illinois it is actually legally allowed for police to "demand" an ID, but there is no requirement on your part to provide it, and technically a police officer is only allowed to "demand" it if they have reasonable suspicion that you are committing, have committed, or is about to commit a crime. </p>

<p>So really in Illinois an officer can only "demand" your ID if they have suspicion of a crime (past, current, or future) and you are not ever legally obligated to provide it, nor can you be charged for not providing it. If the officer said "can I see your ID"? and you provided it, then that is legal since you voluntarily responded to a request (not a demand). </p>

<p>It is not obvious from the description. <a href="http://www.ilga.gov/legislation/ilcs/fulltext.asp?DocName=072500050K107-14" rel="nofollow noreferrer">725 ILCS 5/107-14</a> is the relevant law. When legally stopped, the officer</p>

<blockquote>
  <p>may demand the name and address of the person and an explanation of
  his actions. Such detention and temporary questioning will be
  conducted in the vicinity of where the person was stopped.</p>
</blockquote>

<p>This is stronger than "may request", and is more likely than not to be interpreted as obligatory. You note that the law provides an obligation to give information, not produce a document.</p>

<p>It is not clear that the stop is legal. The requirement is that</p>

<blockquote>
  <p>after having identified himself as a peace officer, may stop any
  person in a public place for a reasonable period of time when the
  officer reasonably infers from the circumstances that the person is
  committing, is about to commit or has committed an offense</p>
</blockquote>

<p>This is the <a href="https://en.wikipedia.org/wiki/Terry_stop" rel="nofollow noreferrer">Terry stop</a> rule on brief public detentions. On the face of it, this is not a traffic stop (you were already stopped: but you didn't say exactly where, which is an important detail). If you just stopped in the road to check your engine, that would be highly irregular and probably itself illegal, so demanding ID would probably be legal. This is a fact-intensive distinction, whether there was or was not a "reasonable suspicion". A vague "feeling that it just didn't seem right" is not reasonable. A lot of other articulable reasons are reasonable.</p>
