
46 Ill. App.3d 511 (1977)
361 N.E.2d 81
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
FRED COOK, Defendant-Appellant.
No. 62479.
Illinois Appellate Court  First District (4th Division).
Opinion filed March 3, 1977.
*512 James J. Doherty, Public Defender, of Chicago (Suzanne M. Xinos, Assistant Public Defender, of counsel), for appellant.
Bernard Carey, State's Attorney, of Chicago (Laurence J. Bolon and David A. Novoselsky, Assistant State's Attorneys, of counsel), for the People.
Judgment reversed.
Mr. JUSTICE ROMITI delivered the opinion of the court:
Fred Cook, hereinafter defendant, was charged in a two count indictment with unlawful use of weapons in that he knowingly carried a pistol concealed in a motor vehicle (Ill. Rev. Stat. 1973, ch. 38, par. 24-1(a)(4)), and in a second count with having committed that same offense within five years of his release from the penitentiary following a felony conviction (Ill. Rev. Stat. 1973, ch. 38, par. 24-1(b)), thus making this offense a Class 3 felony. Following a bench trial defendant was convicted on the second count and was sentenced to the penitentiary for a term of one to three years.
Defendant appeals his conviction, contending that the evidence at trial established the applicability of the statutory exemption for guns which are not immediately accessible. (Ill. Rev. Stat. 1973, ch. 38, par. 24-2(b)(4).) Defendant also contends that the trial court erred in finding him in constructive possession of the gun in issue.
For the reasons hereinafter set forth we reverse the conviction.
At trial State witness Willie Graham, on probation for manslaughter and *513 under indictment for two separate murders, testified that at about 5 a.m. on September 30, 1975, the defendant placed a gun under the hood of a car and then gave Graham a ride in that car to the Lewis Hotel at 1155 North Milwaukee in Chicago. Graham then left defendant and entered the hotel. Chicago police officer Robert Drobniewski testified that when he approached the defendant, defendant was seated behind the wheel of the car, with the key in the ignition and the engine running. When the officer searched the car he discovered the gun in question under the hood, next to the battery.
Defendant testified that it was Graham who gave the defendant a ride. Graham stopped the car outside of the hotel, telling defendant that he wouldn't be gone long, then placed a gun under the hood of the car before entering the hotel. Defendant testified that, while he may have been sitting behind the wheel when approached by the officer, the engine was not running and the key was not in the ignition. The officer then searched the car and found the gun under the hood.
Because of evidence that Graham changed his testimony at trial from that given to defense counsel before trial, the trial judge termed Graham's testimony "suspect." In finding that defendant was in constructive possession of the gun the court apparently disregarded Graham's testimony. The court based its ruling on its finding that defendant knew that the gun was under the hood and defendant was behind the wheel of the car with the engine running when the officer approached him.

I.
Defendant contends that the defense of inaccessibility provided in section 24-2(b) of the Criminal Code was raised and proved at trial. That section provides in relevant part:
"(b) Subsections 24-1(a)(4) and 24-1(a)(10) do not apply to or affect any of the following:
* * *
(4) Transportation of weapons * * * not immediately accessible." Ill. Rev. Stat. 1973, ch. 38, par. 24-2(b)(4).
 1 It is clear that the gun was not immediately accessible to the defendant. In People v. Adams (1962), 73 Ill. App.2d 1, 220 N.E.2d 17, defendant's conviction for carrying a weapon on or about his person was reversed because the gun, found under the driver's seat, was inaccessible to the defendant who was stout and would have had to open the door of his compact car in order to reach the gun. More recently, in People v. Bastien (1974), 19 Ill. App.3d 773, 312 N.E.2d 795 (abstract), defendant was convicted under section 24-1(a)(4) after a gun was found in his car trunk when he was stopped for a minor traffic violation. The appellate court reversed the conviction because the gun was not immediately *514 accessible since defendant would have had to stop his vehicle, walk to the rear of the car, unlock the trunk, and open it in order to get the gun. Similarly, in the case at bar, in order to get the gun the defendant would have had to get out of the car, walk to the front of the car, and open the hood. Under these facts it is clear that the gun was not immediately accessible.  Indeed, in its brief the State does not deny this conclusion, although it does not specifically concede it.
The State relies on subsection 24-2(g) of the Criminal Code, which provides:
"(g) An information or indictment upon a violation of any Subsection of this Article need not negative any exemptions contained in this Article. The defendant shall have the burden of proving such an exemption." Ill. Rev. Stat. 1973, ch. 38, par. 24-2(g).
The State contends that the defendant did not raise the issue of this exemption at trial and therefore it was not required to prove that the defendant did not fall within the exemption.
But this statutory exemption is an affirmative defense. (People v. Williams (1975), 28 Ill. App.3d 67, 328 N.E.2d 192.) Section 3-2 of the Criminal Code defines an affirmative defense:
"(a) `Affirmative defense' means that unless the State's evidence raises the issue involving the alleged defense, the defendant, to raise the issue, must present some evidence thereon.
(b) If the issue involved in an affirmative defense is raised then the State must sustain the burden of proving the defendant guilty beyond a reasonable doubt as to that issue together with all the other elements of the offense." (Emphasis added.) Ill. Rev. Stat. 1973, ch. 38, par. 3-2.
In the case at bar the uncontradicted testimony of the State established that the gun at issue was found under the hood of the car, whereas the defendant was seated in the front seat of the car when the search was initiated. These facts were also brought out by the defendant's testimony and in defendant's cross-examination of the officer involved. The trial judge based his judgment in part on these two facts. We have already found that these facts establish as a matter of law that the gun was not immediately accessible. Therefore, the State's evidence and defendant's evidence raised the issue of inaccessibility. Not only did the State not prove defendant guilty beyond a reasonable doubt as to this issue, the State's evidence actually proved this defense for the defendant.
 2 In People v. Bastien defendant's conviction for unlawful use of a weapon was reversed because the State's evidence established that the weapon was inaccessible. The State seeks to distinguish that case because the court there did not specify whether the defendant argued the issue of *515 inaccessibility at trial. But the statute only requires that the issue of the affirmative defense be raised by the evidence. Once some evidence raises the issue, the State's burden of proof beyond a reasonable doubt includes that issue. Thus in Bastien the court specifically based their reversal on defendant's reasonable doubt argument, which they found convincing because of the affirmative defense established by the State's evidence. In the case at bar, both the State's evidence and the evidence elicited by the defendant raised and proved the issue of inaccessibility. The defendant's motion for a directed verdict and for a new trial were based, in part, on the contention that the State failed to prove defendant's guilt beyond a reasonable doubt. Since the evidence raised the defense of inaccessibility, and in fact proved that defense, the State did fail to meet its burden of proof.

II.
 3 Because of our finding on the issue of inaccessibility, we need not decide whether the court erred in finding that the defendant was in constructive possession of the gun. We do note, however, that a finding of inaccessibility does not prevent a finding of constructive possession, as defendant suggests. Rather, it necessarily prevents a finding of guilt based on that possession.
For the foregoing reasons the judgment of the trial court is reversed.
Reversed.
JOHNSON and LINN, JJ., concur.
