Joshua Brown, the Dallas man gunned down 10 days after taking the stand in the high-profile Amber Guyger trial, had an extensive criminal history, according to a new report.

Legal documents obtained by local station WFAA reveal that Brown himself was no stranger to law enforcement — and was arrested in at least five different cities across Texas.

He was busted for drug possession, evading arrest, theft and having an illegal firearm, the documents reveal.

Brown, 28, was shot dead Friday in what cops are calling a botched drug deal — rejecting any suspicions that the slaying was related to the testimony.

More than two years earlier — from Jan. 4, 2017, to Feb. 17, 2017 — he served time in state jail for a drug possession conviction in Leon County, the station reported.

During that time, he sent a letter to a judge pleading that he be allowed to serve two different sentences concurrently so he could be released earlier, according to the report.

“I am praying when that date comes and I am discharged that I can put the whole series of events behind me and start of on a clean path,” the letter said.

After he was released, he was shot last year at a strip club in North Dallas, according to the report. A man with Brown was killed — but authorities believe Brown was the target, according to court records obtained by the station.

The Friday shootout happened in the parking lot of an apartment complex about 5 miles from where Guyger fatally shot 26-year-old Botham Jean last year.

Michael Mitchell, 32, a 20-year-old relative named Jacquerious Mitchell, and Thaddeous Green, 22, all came from Louisiana to buy drugs from Brown, Chief Avery Moore of the Dallas Police Department’s Criminal Investigation Unit said earlier this week.

An argument ensued in which Brown first shot Jacquerious, wounding him, and Green squeezed off two rounds at Brown, Moore said.

So far, both Mitchells are in police custody, but Green remains at large.