We aimed to determine the impact of codeine rescheduling on prescribing of codeine and other opioids, with a focus on demographic and diagnoses associated with codeine prescribing before and after rescheduling of codeine to prescription-only in February 2018. We used interrupted time series analysis (February 2016-February 2020) and probit regression to examine prescribing of codeine and other opioids according to primary care data from 464 general practice clinics in Victoria, Australia. The rate of codeine prescribing increased in the month following rescheduling (additional 76 people/10000, 95% confidence interval [CI] 49-103), then declined to baseline rates (slope -2.02, 95% CI 3.79, -0.25). Prescribing of other opioids did not change. Post rescheduling, females were more likely to receive codeine prescriptions compared to males (β=0.094, 95% CI 0.08-0.108) and those aged 70-79 years were more likely to receive codeine compared to those aged <30 years. Those residing in the least disadvantaged areas had a greater probability of being prescribed codeine than those in more disadvantaged areas after rescheduling (β =0.154, 95% CI 0.129-0.179). A documented mental health diagnosis (β =0.067, 95% CI 0.052-0.082) or migraine diagnosis (β =0.057, 95% CI 0.037-0.078) was associated with increased likelihood of receiving a codeine prescription after rescheduling compared to before in contrast to those without such a diagnosis. Codeine rescheduling did not result in a sustained increase in codeine prescribing nor a change in the prescribing of other opioids. Patient factors associated with increased codeine prescribing after compared to before rescheduling included female sex, older age, migraine diagnosis and comorbid mental health conditions. EU PAS Register (EUPAS43218).