Why was there a war in Wales in 1277?

The war in Wales was referred to as the Edwardian Conquest of Wales. Edward I of England defeated and annexed the last remaining independent Welsh principalities.