Philip was able to achieve a successful resolution of the ongoing Flanders problem. The Count of Flanders ruled an "immensely wealthy state", which largely led an autonomous existence on the edge of the French state. The French king was generally regarded as having suzerainty over Flanders, but in recent years the relationship had become strained. Philip IV had been defeated at Courtrai in 1302 attempting to reassert French control, and despite the later French victory at the Battle of Mons-en-Pévèle the relationship remained tense.