Police had to resort to CS spray after a drunken man repeatedly ignored their advice to go home, and challenged them to fight.
Andrew Birney caused a disturbance outside the cell complex of the police station, shouting to people in custody.
He ignored repeated warnings about his behaviour, and advice to go home, and was eventually arrested.
At Jedburgh Sheriff Court on Monday, Birney, 20, of Sunnyhill Road, admitted threatening or abusive behaviour and challenging police to fight at the police station on September 21.
“He was highly drunk,” explained procurator fiscal Graham Fraser, “and was seen outside the cells complex at 11pm, shouting to people in custody.
“He was warned about his behaviour, and escorted from the grounds, and told to go home. He returned 15 minutes later and repeated his behaviour,” added Mr Fraser.
“He was again advised to go home, and even offered a lift, which he declined.
“He started shouting and swearing at the police, challenging them to fight and, in the course of his arrest, CS gas was sprayed,” said Mr Fraser.
Defence solicitor Robert More conceded his client was “heavily under the influence of alcohol” at the time of the offence.
“This has been a feature of his offending history,” he explained, “and he has scant recollection of what happened.
“He is now full of contrition, especially as he knew one of the officers personally, as he was his rugby coach,” he added.
Mr More said Birney had reduced his alcohol consumption in recent months in a bid to address matters.
Birney, who usually works as a painter/decorator, was fined £160.