A Washington man will serve an 18-year prison term for supplying the heroin that killed a woman two years ago.

Tazewell County Circuit Judge Michael Risinger on Tuesday handed James Brekke, 24, the longest sentence available in the range Brekke accepted when he pleaded guilty in May to the drug-induced homicide of Carrie Maynard, also of Washington. The crime carries a maximum 30-year term.

Brekke acknowledged at his arrest that he supplied heroin for Maynard, 37, the day before she was found dead on Sept. 6, 2016, along the Wood Street bicycle trail near her home, a prosecutor’s court affidavit stated.

Maynard and another woman drove with Brekke to a home in Peoria where Brekke purchased the drug. An hour after she returned, her boyfriend, with whom she lived, saw her apparently under its influence.

Maynard left the house and was found deceased the next day, the affidavit stated.

Text messages on Maynard’s cellphone, found in her purse next to her body, included recent contacts with Brekke that indicated he had made drug transactions with her in the past.

Brekke must serve at least 75 percent of his sentence. He’ll be given credit for 617 days he spent in custody pending prosecution.