Prime Minister Imran Khan's party was on the verge of forming the first administration in Pakistan-occupied Kashmir after winning 25 of the 45 seats in legislative assembly elections marked by fatal violence and charges of irregularities by the opposition.