The State appeals an order suppressing a witness’s out-of-court and in-court identifications of Gibson. Gibson was charged with grand theft and resisting a merchant’s employee as the result of the theft *253of two televisions from a Walmart. We convert this direct appeal to a petition for writ of certiorari. Because the trial court departed from the essential requirements of the law in failing to consider the appropriate factors to determine whether the impermissibly suggestive identification procedure should result in the suppression of the out-of-court and in-court identifications, we grant the petition, quash the order, and remand for further proceedings.
Jurisdiction
The State filed a notice of appeal asserting that it was appealing an order suppressing evidence before trial. However, Florida Rule of Appellate Procedure 9.140(c)(1)(B), only allows direct appeal by the State of orders suppressing “evidence obtained by search and seizure.” The challenged photo pack and identification were not obtained by search and seizure. Instead, review of an order suppressing both an in-court and out-of-court identification is by certiorari. See State v. Dorsey, 5 So.3d 702, 708 (Fla. 2d DCA 2009); see also State v. Styles, 962 So.2d 1031, 1032 (Fla. 3d DCA 2007) (reviewing by certiorari an order suppressing an out-of-court identification based on a photographic array); State v. Gomez, 937 So.2d 828, 830 (Fla. 4th DCA 2006) (treating the State’s appeal of an order suppressing in-court and pretrial identifications as a petition for writ of certiorari). Thus, we treat the State’s appeal as a petition for writ of certiorari. See State v. Pettis, 520 So.2d 250, 253 (Fla.1988); Dorsey, 5 So.3d at 703.
Merits
Gibson sought to suppress witness Adrian Morris’s identification of Gibson as the person who committed the theft and resisted a Walmart employee. At the suppression hearing Adrian Morris and Deputy George Moffett testified. On December 24, 2010, Morris, an assistant manager for Walmart, saw loss prevention officer Donna Mckenzie and an African-American male just outside the doors of the store; they were fighting over two television sets in a shopping cart. Morris saw them from as far as twenty yards to as close as about seven feet as Morris approached. It was a well-lit area. At one point the man looked up and Morris made eye contact with him. The man then gave up the struggle and jumped into a white pickup truck that drove away. Morris got the license plate number. During his testimony Morris referred to focusing his attention on the man for fifteen to twenty minutes, but Morris later clarified that it was fifteen to twenty seconds.
When Deputy Moffett arrived at the scene, Morris described the suspect as an African-American man who was thirty-five to forty-five years old. The man was wearing a hat and sunglasses. Morris gave the deputy the license plate number, and the deputy testified that he believed that the truck was registered to Gibson’s father. Deputy Moffett reviewed the surveillance video and could not see the suspect’s face but could see his build and stature. After conducting a search in the DAVID database from the DMV, Deputy Moffett told Morris that he observed a photograph that closely resembled the suspect that Deputy Moffett saw in the surveillance video. The deputy told Morris that he would compile a photo pack and return at a later date.
Two days later, Deputy Moffett showed Morris a photo pack with six photos. Gibson’s photo was in the array. The deputy instructed Morris that the suspect may or may not be included in the photo pack and not to identify anyone unless Morris was 100 percent sure. Morris testified that he viewed the photo pack within twenty-four *254hours of the incident, that he was not influenced to pick the photo that he picked, and that as soon as he saw Gibson’s photo he recognized him.
The trial court found that the photo pack identification procedure was imper-missibly suggestive for two reasons. First, the deputy told Morris that based on the deputy’s research he found a photo of someone who closely resembled the perpetrator in the surveillance video and that the deputy would prepare a photo pack and return. This suggested to Morris that the photo pack would contain a photo of the person whom the deputy believed closely resembled the perpetrator seen in the video. Second, the trial court found that Gibson’s photo was the only one that depicted a middle-aged person and that the other five individuals all appeared to be younger than thirty.1 The trial court found that only one photo in the photo pack fit the description of an African-American man between thirty-five and forty-five years old. Coupled with Morris being conditioned to believe the perpetrator’s photo would be in the photo pack, the trial court found the procedure impermis-sibly suggestive. The court suppressed the out-of-court identification and any in-court identification Morris might make in the future.
We must review the trial court’s ruling based on the standards for certiora-ri review. The State has a limited right to file a petition for writ of certiorari to challenge a pretrial ruling. State v. Storer, 920 So.2d 754, 758 (Fla. 2d DCA 2006) (citing State v. Pettis, 520 So.2d 250 (Fla.1988)). This is because double jeopardy limits the right of the State to obtain adequate posttrial relief. Id. However, it is insufficient to show that a trial court’s ruling is incorrect; rather, the State must show that the trial court departed from the essential requirements of the law. State v. Dorsey, 5 So.3d 702, 706 (Fla. 2d DCA 2009); State v. Smith, 951 So.2d 954, 957 (Fla. 1st DCA 2007).
A trial court must apply the following two-pronged test to determine whether to suppress an out-of-court identification: “(1) whether the police used an unnecessarily suggestive procedure and (2), if so, considering all the circumstances, whether the suggestive procedure gave rise to a substantial likelihood of irreparable misidentification.” Dorsey, 5 So.3d at 705; see also Fitzpatrick v. State, 900 So.2d 495, 517-18 (Fla.2005). When considering the totality of the circumstances to evaluate the likelihood of misidentification, the trial court must consider the following factors: “(1) the opportunity of the witness to view the criminal at the time of the crime, (2) the witness’s degree of attention, (3) the accuracy of the witness’s prior description of the criminal, (4) the level of certainty demonstrated by the witness at the confrontation, and (5) the length of time between the crime and the confrontation.” Dorsey, 5 So.3d at 705; see also Fitzpatrick, 900 So.2d at 518. The determination of whether the procedure was unnecessarily suggestive “is wholly separate and apart from the reliability of the identification.” Styles, 962 So.2d at 1034.
With respect to an in-court identification, when law enforcement obtains a pretrial identification by an impermissibly suggestive procedure, “an ‘in-court identification may not be admitted unless it is found to be reliable and based solely upon the witness’ independent recollection of the offender at the time of the crime, uninflu*255enced by the intervening illegal confrontation.’” Dorsey, 5 So.3d at 706 (quoting Edwards v. State, 538 So.2d 440, 442 (Fla.1989)). To gauge the reliability of an in-court identification, the trial court must consider the following factors:
“the prior opportunity the witness had to observe the alleged criminal act; the existence of any discrepancy between any pretrial lineup description and the defendant’s actual description; any identification prior to the lineup of another person; any identification by picture of the defendant prior to the lineup; failure to identify the defendant on a prior occasion; any time lapse between the alleged act and the lineup identification; and any other factors raised by the totality of the circumstances that bear upon the likelihood that the witness’ in-court identification is not tainted by the illegal lineup.”
Fitzpatrick, 900 So.2d at 519 (quoting Edwards, 538 So.2d at 443). The State has the burden to demonstrate an independent source for the in-court identification. Dorsey, 5 So.3d at 706.
In Dorsey, this court recognized that the trial court may have reached an incorrect result in applying the factors concerning the likelihood of misidentification for the out-of-court identification. 5 So.3d at 706. However, this court determined that the State failed to show that the trial court had applied the wrong law in excluding the out-of-court identification and was unable to conclude that the trial court departed from the essential requirements of the law. Id. In contrast, this court also determined in Dorsey that the trial court did depart from the essential requirements of law regarding the suppression of the in-court identification. The trial court had only stated that the impermissibly suggestive lineup tainted any further in-court identification. Id. at 707. The trial court departed from the essential requirements of law because it failed to “conduct a separate analysis of the factors to be considered in gauging the reliability of an in-court identification when the police have obtained a pretrial identification by means of an unnecessarily suggestive procedure.” Id.
Here, we cannot say that the trial court departed from the essential requirements of the law in determining that the procedure used for the out-of-court identification was unnecessarily suggestive. The trial court based its determination on (1) the deputy’s statements that after he conducted DAVID research he found a photo of someone who closely resembled the person in the surveillance video and he would return to Morris with a photo pack, coupled with (2) the fact that Gibson’s photo was the only one that depicted a middle-aged person fitting Morris’s description of a man between thirty-five and forty-five years old.
With respect to the second prong of the test regarding an out-of-court identification, however, the trial court failed to consider the factors and find that there was a substantial likelihood of misidentifi-cation. Although in making its oral ruling the trial court discussed some of the mis-identification factors with respect to cases that the parties cited in support of their respective positions, the trial court never made a finding in the present case that there was a substantial likelihood of mis-identification in addition to an impermissi-bly suggestive procedure. Therefore, we conclude that the trial court departed from the essential requirements of the law in suppressing the out-of-court identification.
As to the suppression of the in-court identification, the trial court only stated at the end of the suppression hearing that it was suppressing both the photo pack and the in-court identification. The court did not make any findings or give any reason *256for its ruling. Nothing indicates that the court made the required analysis of the reliability factors before suppressing the in-court identification; thus, the trial court departed from the essential requirements of law. See Dorsey, 5 So.3d at 707. Therefore, we grant the petition for writ of certiorari, quash the order suppressing evidence, and remand for further proceedings.
Petition granted, order quashed, and remanded.
VILLANTI and CRENSHAW, JJ., Concur.. From our review of the record, it appears that some of the individuals depicted in the photo pack were in their late teens or early twenties.