The death toll from the attack on Indian security forces in Kashmir has risen to 25, police said Wednesday, the deadliest since 2002.

"The death toll was 25," police officer Munir Ahmed Khan told AFP.

The first toll was the death of 12 soldiers.

The Press Trust of India, for its part, said the attack killed at least 39 people.

"Depending on the condition of the damaged vehicles, the toll could rise," a senior police official said, speaking on condition of anonymity.

The attack targeted two blue buses carrying at least 35 passengers on a highway about 20 kilometers from Srinagar. The blast was heard 12 kilometers from the site of the attack.

The attack was the bloodiest in Indian Kashmir for more than two years. Nineteen soldiers were killed in September 2016 during an attack on the Indian military camp of Uri.

The group claimed responsibility for the attack, local media quoted a statement by the Jamaat-e-Islami Islamic Group in Pakistan as saying.

The pictures, whose source was not confirmed, showed the remains of at least seven vehicles scattered along the highway near blue military buses.