The 21-year-old man, from Bonnyrigg, was detained for urinating in a public place in Lothian Drive in Dalkeith, Midlothian, at around 2:40am on Saturday.
He was issued with a fixed penalty notice for antisocial behaviour. The man was caught as part of high-visibility foot patrols carried out in the town over the weekend to target antisocial behaviour at key hotspots.