Historically, emergency departments (ED) evolved to serve as a substitute for primary care (PC), especially among populations that tend to lack PC access, such as the uninsured and Medicaid enrollees. Although the Affordable Care Act (ACA) policy makers aimed to decrease ED visits by expanding insurance coverage and thus PC access, the ACA Medicaid expansion increased ED visit rate among patients with Medicaid coverage. Additionally, the substitution assumption is under scrutiny, given increasing evidence on referrals from PC providers to the ED, which would indicate complementarity instead. We empirically tested whether primary care and ED visits for primary care treatable (PCT) conditions are substitutes or complements. Using consumer choice theory from economics, we developed a testable model that differentiates between substitution and complementarity between PC and ED visits. In both cases, ED visit rates are represented as a spline function, with an estimated knot, of PC supply; negative slope on the left spline indicates substitution and positive slope indicates complementarity. We used non-linear least squares to estimate the function. We used a unique data linkage from New York state: county-month level Medicaid managed care enrollment and county-quarter level provider data from NY Department of Health, and ED visit data from SPARCS (9/2014-9/2015) (N=793). In selecting covariates and fixed effects, we assessed model fit. The best- fitting model specification includes county fixed effects and three time-varying covariates: poverty rate, unemployment rate, and percent population in Medicaid managed care. Bootstrap standard errors were calculated. ED visits for PCT conditions by population aged 0-64 y.o. were included in the analysis. Using the NYU ED classification algorithm, we identified conditions that are 100% PCT, based on both the principal and admitting diagnoses. ED and PC visits were substitutes for one another statewide (slope coefficient -0.28, P<0.05), but served as complements during nights and weekends in highly urban and poorer counties (slope coefficient 0.63, P<0.01; population in poverty 21.7-31.5%). PC physician supply was associated with decreased ED use in rural counties during the day (-0.11, P<0.10) but increased ED use during nights and weekends in highly urban (0.23, P<0.01) and richer counties (population in poverty 5.8-9.0%). These relationships reversed when advanced practice providers (APPs) were considered instead (0.19, P<0.05 during the day across all counties; -0.24, P<0.01 during nights and weekends in highly urban and in richer counties, ie, population in poverty 5.8-11.3%). While the ED is used as a substitute for primary care during the day, complementarity at night and on weekends indicates increasing prominence of referrals, the rates of which appear to vary across areas. While during the day, higher PC physician supply appears to divert Medicaid enrollees from the ED, PC APP supply contributes to more ED use for low-acuity conditions. Policy makers should not assume that increasing PC access will necessarily reduce low-acuity ED visits. More nuanced understanding suggests that policies to decrease low-acuity ED use via PC access improvements in Medicaid will be more effective if they focus on increasing actual appointment availability, ideally by primary care physicians, in areas with low primary care supply.