RALEIGH, N.C. (AP) — North Carolina judges have decided police performed an unconstitutional search when knocking on an apartment back door from where authorities say an informant had once purchased heroin.

The state Court of Appeals reversed Tuesday a trial court's refusal to suppress evidence obtained after a 2016 "knock and talk" performed by a Durham officer that led to charges against Kareem Stanley.

Officers approached the back door to serve an arrest warrant on another man the informant said was selling. An investigator gave his first name when someone behind the door asked who was knocking. Stanley was a house guest and opened the door. Police searched and charged Stanley, who later pleaded guilty but appealed.

Tuesday's unanimous opinion says police officers should have gone to the "clearly visible and unobstructed" front door.