Two alleged drug dealers avoided jail thanks to their impeccable grammar.

Luke Rance, 19, and Brandon Kerrison, 21, were arrested outside a Swansea library on Dec. 17, 2017.

Authorities said Rance was selling marijuana to Kerrison, who in turn was selling it to others, according to The Telegraph.

They were caught when nearby officers said they smelled smoke from a cannabis cigarette Rance was allegedly smoking.

During a search, Rance was reportedly holding seven bags of cannabis and a small amount of cocaine, while Kerrison allegedly had two bags of herbal cannabis.

According to The Times, evidence against the pair included text messages from Kerrison's phone; saying, "Mad flavours from 10 tonight – let me know for more details."

During their Jan. 2, 2019, sentencing, Judge David Hale referenced their grammar in the text messages, saying it was much more advanced than the average dealer’s conversation.

Rance and Kerrison, who were first-time offenders, admitted to possession with intent to supply. Rance also admitted to possession of cocaine, according to The Telegraph.

They were sentenced to one year of community service with 100 hours of unpaid work, and Kerrison was ordered to undergo a rehab program. They could’ve faced more than six months in jail.

Hale said the lighter sentence was also affected by the fact that the pair spent the previous year staying out of trouble and attending school.