
209 P.3d 196 (2009)
STATE of Idaho, Plaintiff-Respondent,
v.
Frederick L. HUDSON, Defendant-Appellant.
No. 34685.
Court of Appeals of Idaho.
March 18, 2009.
*197 Bryce W. Powell of Powell & Reed, Sandpoint, for appellant.
Hon. Lawrence G. Wasden, Attorney General; Rebekah A. Cudé, Deputy Attorney General, Boise, for respondent.
PERRY, Judge.
Frederick L. Hudson appeals from the district court's order, on intermediate appeal, affirming his judgment of conviction for misdemeanor possession of a controlled substance. Specifically, Hudson challenges the magistrate's order denying his motion to suppress. For the reasons set forth below, we reverse the district court's order and vacate Hudson's judgment of conviction.

I.

FACTS AND PROCEDURE
Police responded to a motel based on a report from motel security of marijuana smoke allegedly emanating from one of the rooms. An officer knocked on the door of the room and was greeted by Hudson. When Hudson opened the door, the officer noted a strong smell of marijuana coming from inside the room and observed that Hudson's eyes were red-a possible indicator of marijuana use. The officer asked for Hudson's identification, and Hudson handed the officer his driver's license. The officer began to question Hudson regarding the odor emanating from his motel room. Hudson then grabbed his driver's license from the officer and attempted to close the door, but the officer prevented the door from closing with his foot and pushed it open so he could continue to see Hudson as Hudson retreated into the room. After Hudson refused the officer's request to enter the room, the officer asked to speak with Hudson's girlfriend who was also in the room. While the door thereafter remained open, the officer conversed with Hudson's girlfriend in the hallway awaiting the arrival of a second officer. When the second officer arrived minutes later, Hudson granted permission for the officer to enter the motel room and later consented to a search of the room. During the search, the officers discovered a marijuana roach. Hudson was charged with misdemeanor possession of a controlled substance. I.C. § 37-2732(c)(3).
Hudson filed a motion to suppress the evidence obtained from his motel room as the product of an unlawful, warrantless search and seizure. Hudson also argued that his consent to the search was not voluntary. Following an evidentiary hearing, the magistrate held that the officer placing his foot in the door to prevent it from closing constituted an unlawful entry violative of the constitutional prohibition against warrantless searches, but that Hudson's later consent to the second officer's entrance and search was given voluntarily. Therefore, the magistrate denied Hudson's motion to suppress. Hudson then entered a conditional guilty plea and appealed the magistrate's decision to the district court.
On intermediate appeal, the district court held that the magistrate did not impermissibly shift the burden of proof to Hudson when it stated that, in light of the state's evidence that consent was voluntarily given, Hudson would have to show that the consent was not given voluntarily in order to prevail. Additionally, the district court held that the evidence supported the magistrate's finding that Hudson's consent was given voluntarily. Furthermore, the district court held that Hudson's consent was not derived from the officer's unlawful entry into the motel room with his foot because Hudson successfully refused the officer's request to enter and an appreciable period of time passed between the unlawful intrusion and the subsequent granting of consent. Hudson again appeals.

II.

ANALYSIS
Hudson argues that the district court erred in affirming the magistrate's denial of his motion to suppress because, he contends, the district court disturbed one of the magistrate's findings of fact. Additionally, Hudson asserts that the magistrate impermissibly shifted the burden of proof regarding the *198 voluntariness of Hudson's consent to search. Lastly, Hudson argues his consent to search his motel room was not given voluntarily.
On review of a decision of the district court, rendered in its appellate capacity, we review the decision of the district court directly. State v. DeWitt, 145 Idaho 709, 711, 184 P.3d 215, 217 (Ct.App.2008). We examine the magistrate record to determine whether there is substantial and competent evidence to support the magistrate's findings of fact and whether the magistrate's conclusions of law follow from those findings. Id. If those findings are so supported and the conclusions follow therefrom and if the district court affirmed the magistrate's decision, we affirm the district court's decision as a matter of procedure. Id. We exercise free review over the application of constitutional principles to the facts as found by the trial court. State v. Bowman, 134 Idaho 176, 179, 997 P.2d 637, 640 (Ct.App.2000).
At the hearing on the motion to suppress before the magistrate, the only evidence presented was the testimony of Hudson and the two officers. After hearing the testimony, the magistrate stated its findings of fact and conclusions of law as follows:
I think quite clearly [the first officer's] initial entry into the room, and I say entry I mean sticking his foot in the doorway and that's all it takes to break the threshold, it impacts the Fourth Amendment and that was an unlawful entry under these circumstances. There is no right to do that under these circumstances based on plain view or plain smell. That doctrine does not get you into a room, you have to be there lawfully to begin with before you can then rely on that doctrine as a search exception. However, ... notwithstanding that there was an initial Fourth Amendment violation by putting the foot in the door jam and even propping the door open... that does not mean that the entire case is irretrievably tainted. It's clear from even the defendant's own testimony that he subsequently twice gave [the second officer] permission to search after giving him separate permission to enter the room and it was during the course of that search that the contraband was found which prompted basis for the charge before the court. The only way for the defense to prevail under those circumstances is to show to the court's satisfaction that the consent, the subsequent consent that was expressly given was not given voluntarily; and the fact that [Hudson] was given a Hobson's choice between cooperating or going straight to jail which was actually more of the nature of a bluff under the circumstances, that does not invalidate the consensual or the voluntary nature of this consent, not from an objective standpoint. He could have and in hindsight from his perspective should have asserted his rights and said no and probably we wouldn't be here today but he did give that consent, that consent was valid. The motion to suppress is denied.
The district court affirmed.
Hudson argues that the magistrate incorrectly found that his consent to the second officer's entry and the search was voluntary and also contends that his consent cannot validate the search because it was tainted by the first officer's Fourth Amendment violation in preventing Hudson from closing the door. We do not address the voluntariness issue because we conclude that the consent, even if not coerced, was nonetheless ineffective because it was the fruit of the Fourth Amendment violation.
In this case, the magistrate correctly found that the first officer unlawfully entered Hudson's motel room when he stopped the door from closing with his foot and then pushed it open so he could continue to observe Hudson. See, e.g., State v. Maland, 140 Idaho 817, 822, 103 P.3d 430, 435 (2004) (holding that officer's use of foot to prevent defendant from closing the door constituted an unlawful entry, regardless of the extent of the intrusion). The officer requested to enter the room and Hudson refused. After the second officer arrived, Hudson allowed him to enter through the open door and eventually consented to the search of his room which led to the discovery of the marijuana roach. The magistrate found that the totality of the circumstances did not support Hudson's argument that his consent was involuntary or coerced.
*199 Proof of an unlawful police entry does not necessarily mandate suppression of all subsequently-acquired evidence. The attenuation doctrine permits the use of evidence that would normally be suppressed as fruit of police misconduct if the causal chain between the misconduct and the discovery of the evidence has been sufficiently attenuated. See State v. Hoak, 107 Idaho 742, 749, 692 P.2d 1174, 1181 (1984). In applying the attenuation doctrine, the ultimate question is whether the police acquired the evidence by exploiting the illegality or by means sufficiently distinguishable to be purged of the primary taint. See Wong Sun v. United States, 371 U.S. 471, 488, 83 S.Ct. 407, 417, 9 L.Ed.2d 441, 455 (1963); State v. Bigham, 141 Idaho 732, 734, 117 P.3d 146, 148 (Ct. App.2005). The Idaho Supreme Court has employed a three-factor test to determine attenuation: (1) the elapsed time between the misconduct and the acquisition of the evidence; (2) the occurrence of intervening circumstances; and (3) the flagrancy and purpose of the improper law enforcement action. State v. Page, 140 Idaho 841, 846, 103 P.3d 454, 459 (2004).
At the hearing on the motion to suppress, the first officer testified concerning his entry into the motel room:
[DEFENSE COUNSEL]: Okay, and between the time you stuck your, your foot in the door to keep it open and the arrival of [the second officer], what did you do, uh, with respect to the door to the hotel room?
[OFFICER]: The door was already open. Uh, after Mr. Hudson attempted to close it I stuck my foot in it. He retreated back into the room. I opened the door so that I could still see him and the door remained in that position.

....
[DEFENSE COUNSEL]: How many minutes do you think it was between, uh, your incursion of your foot and the arrival of [the second officer]?
[OFFICER]: I believe it was between three and five minutes, the entire time from my first contact until then so I'd say around three minutes.
Based on this testimony, the unlawful "search" of Hudson's motel room never ended because the officer prevented Hudson from restoring his privacy by closing the door. The door remained open and the officer remained in a position to observe Hudson through the open door, howbeit from the hallway. Therefore, because the unlawful intrusion was ongoing, the search and subsequent acquisition of the incriminating evidence was contemporaneous and irrevocably intertwined with the misconduct. In addition, the record contains no evidence of intervening circumstances which would independently justify the unlawful police intrusion. Hudson's consent to the second officer to search his room was tainted by the unlawful activity and was rendered invalid. Accordingly, the evidence obtained from Hudson's motel room must be suppressed as fruit of the Fourth Amendment violation. We need not address Hudson's additional argument that the magistrate impermissibly shifted the burden of proof based on statements it made at the hearing on the motion to suppress.

III.

CONCLUSION
The police officer's unlawful entry into Hudson's motel room was a violation of the Fourth Amendment's prohibition against unreasonable searches and seizures. The unlawful entry never ended; therefore, the search and acquisition of the incriminating evidence was contemporaneous with the unlawful activity. No intervening circumstances existed which would independently justify the ongoing, unlawful entry. Thus, Hudson's consent to the search of his motel room was rendered invalid and the incriminating evidence acquired during the search must be suppressed as the fruit of the Fourth Amendment violation. We need not address Hudson's other arguments. Therefore, we reverse the district court's order, on intermediate appeal, affirming the magistrate's denial of Hudson's suppression motion. Accordingly, Hudson's judgment of conviction must also be vacated.
Chief Judge LANSING and Judge GUTIERREZ concur.
