STAMFORD — An intoxicated city man was charged with burglary after police said he mistakenly walked into the wrong downtown apartment early Tuesday morning.

Sgt. Simon Blanc said police officers rushed to a North Street apartment at 6:40 a.m. after a report of a strange man in the bathroom. When police arrived, they were pointed to the bathroom by the apartment dweller and they could heard what sounded like someone rinsing out their mouth out with water.

After commanding the person to step out, the door opened up and out walked Alvaro Salazar-Lopez, 33, who told an officer in Spanish that he went out drinking Monday night and must have walked into the wrong apartment. Salazar-Lopez showed police that he lives right around the corner on West Washington Avenue.

Police spoke to the apartment dweller’s friend, who said she spent the night sleeping on the living room sofa and heard a man walk through the front door at about 4 a.m. She said she assumed it was her friend’s husband, who she had not yet met.

She said the man looked at her on the sofa for a few seconds before sitting down and falling asleep. The woman said she, too, nodded off a few minutes later. Around 6:30 a.m. the woman who rents the apartment got up and discovered someone else was in the bathroom, police said.

After finding her friend still on the sofa and her daughter sleeping in her own bedroom, the woman did not know who could be in the bathroom and opened the door. She said Salazar-Lopez, who was sitting on the toilet, turned to her and smiled, police said.

The woman called 911 to report the stranger in her home.

Salazar-Lopez was charged with second-degree burglary and held in lieu of a $10,000 court-appearance bond.