OLYMPIA — Washington’s Supreme Court has unanimously struck down the drug possession convictions of a man who was detained at a U.S.-Canada border crossing for five hours without being advised of his rights.

Alejandro Escalante was returning with three friends from a music festival in Canada in 2017 when border guards at the Frontier crossing, north of Spokane, stopped them for inspection. The guards found small amounts of drugs on the driver and another passenger, but not on Escalante.

However, they kept Escalante in a locked lobby for hours as they searched their van and found a backpack with a small amount of heroin and LSD. Upon questioning, Escalante admitted the backpack was his.

Federal prosecutors declined to file charges because of the small amount of drugs, but state prosecutors did so. They argued that the border guards were not required to advise Escalante of his right to remain silent or other rights because he was not “in custody” while being kept in the lobby during the border inspection.

Washington’s high court disagreed. In an opinion Thursday by Justice Steven Gonzalez, the justices reversed his drug possession convictions, saying that just because the government called the locked room a “lobby” instead of a holding cell didn’t mean he wasn’t in custody.