Badajoz is a city in southwestern Spain, near the Portuguese border. It is the capital of Badajoz province in the Extremadura autonomous community.