Task: Question Generation
Input (English): The land within the borders of current Portugal has been continuously settled and fought over since prehistoric times. The Celts and the Romans were followed by the Visigothic and the Suebi Germanic peoples, who were themselves later invaded by the Moors. These Muslim peoples were eventually expelled during the Christian Reconquista of the peninsula. By 1139, Portugal had established itself as a kingdom independent from León. In the 15th and 16th centuries, as the result of pioneering the Age of Discovery, Portugal expanded Western influence and established the first global empire, becoming one of the world's major economic, political and military powers.
Output (English): By what year had Portugal established itself as an independent kingdom?