Answer:
To dislodge them, Peter took an active part in forming the great alliance, comprising Russia, Saxony, and Denmark–Norway, which started the Northern War in 1700. This war lasted for 21 years and was Peter's main military enterprise.