Abstract Background Mediterranean diet has been shown to promote beneficial effects on health, while ultra-processed food (UPF) consumption has been associated with lower diet quality and higher risk for non-communicable diseases. Our aims were to explore the adherence to a Mediterranean dietary pattern (MDP) in Portugal and its association with sociodemographic factors and UPF consumption. Methods Participants were from the Portuguese National Food, Nutrition and Physical Activity Survey 2015-2016, aged 18-84y (n = 3,852). CAPI face-to-face interviews were used including 2 dietary 24-h recalls. UPF were identified using NOVA classification. Adherence to MDP was defined by the Mediterranean Diet Score (MDS), which may vary from 0 to 9. MDS≥6 was considered as high adherence. Weighted multivariate logistic regression analysis was used to explore associations of high adherence to MDP with sex, age, region, educational level, family income and dietary share of UPF groups. Results High adherence to MDP was observed for 19.6% of participants and was inversely associated with higher consumption of UPF, namely, sugar-sweetened beverages (OR = 0.924; 95%CI 0.883-0.966), confectionery (OR = 0.893; 95%CI 0.816-0.977), sweet snacks (OR = 0.953; 95%CI 0.923-0.985), cakes/desserts (OR = 0.956; 95%CI 0.934-0.978) and meat products (OR = 0.922; 95%CI 0.874-0.972). Being female (OR = 0.629; 95%CI 0.471-0.841) and not from the North or Alentejo regions were inversely associated with high adherence to MDP. There was no relation between income and adherence to MDP. The higher the level of education or age, the higher the odds of high adherence to MDP (OR = 2.573; 95%CI 1.741-3.803 and OR = 1.028; 95%CI 1.020-1.037, respectively). Conclusions Actions to improve adherence to MDP in Portugal should consider discouraging UPF consumption and be addressed to specific subgroups. Funding POCI-01-0145-FEDER-032090 (FCT/FEDER); FAPESP 2018/07391-9, 2019/05972-7 (MCR), 2016/14302-7 (FR). Key messages High adherence to a Mediterranean dietary pattern was observed for near 20% of Potuguese over 18 years old. The higher the level of education or age, the higher the odds of high adherence to MDP. High adherence to a Mediterranean dietary pattern was inversely associated with higher consumption of sugar-sweetened beverages, confectionery, sweet snacks, cakes/desserts and meat products.