The violence had subsided after Pakistan 's new government to came to power after defeating allies of President Pervez Musharraf in an election in February , and began peace negotiations with militants .