Ismael Mendez owed his friend Derek Mantilla $1,800, and Mantilla wanted his money.

“I don’t care if you have to put your broad on the block to pay me back,” Mantilla texted Mendez in the fall of 2014.

So Mendez, a 20-year-old living in Annandale, persuaded his 15-year-old girlfriend to prostitute herself until his debt was paid off.

On Friday, Mantilla was sentenced to 12 years in prison after pleading guilty to sex-trafficking of a minor.

Mantilla, 21, of Fairfax, told the judge at his sentencing that he tried to fill a void left in his life by the lack of a “father figure” by joining the 18th Street Gang at a young age. Mantilla and Mendez were both members of the El Salvadoran gang, a rival to the better-known MS-13.

Gangs in Northern Virginia have increasingly turned to child prostitution to make money. But in this case, the financial motive appears more personal: Someone had stolen $1,800 worth of marijuana from Mendez, who needed to repay his supplier. He borrowed the money from Mantilla.

At first, the girl said no to Mendez’s request, prosecutors say.

“If you really wanted to show that you loved me, you would do this,” Mendez told her, according to court documents. Eventually, she agreed.

For four months and working seven days a week, the girl met 10 to 12 customers a night as the group traveled up and down the East Coast, according to prosecutors.

The two men told her to lie and say she was 18 or 19 years old. Customers paid as much as $220 for an hour with the girl. After the debt was paid off, they told her to leave them.

Mendez was sentenced earlier this year to 10 years in prison. Mantilla’s girlfriend, an adult who had worked as a prostitute, has also pleaded guilty.

On Friday, while Mantilla called his crime “unacceptable,” he added, “I am still young and still have the capacity to change.”

He also has serious mental health problems and has struggled with drug abuse, Judge Leonie Brinkema noted.