Peshawar: An anti-terrorism court judge and three members of his family, including wife, daughter-in-law and a two-year-old grandson, were shot dead after unidentified gunmen attacked their vehicle while they were travelling from the Swat Valley in northwest Pakistan to Islamabad, police said.

Two security guards who were part of the judge's convoy were also injured in the shootout.

The vehicle of ATC Judge Aftab Afridi, who was posted in Swat district, was intercepted by the gunmen near Swabi Interchange on Peshawar-Islamabad motorway in Swabi district of Khyber Pakhtunkhwa province.

The gunmen sprayed the judge's vehicle with bullets, killing him, his wife, daughter-in-law and a two-year-old grandson.

The gunmen fled the scene after the attack. No group has so far claimed responsibility for the attack.

The attack was condemned by Prime Minister Imran Khan, Khyber Pakhtunkhwa province Governor Shah Farman, Chief Minister KPK Mehmud Khan and National Assembly Speaker Asad Qaisar.

Khan said that the "perpetrators of this gruesome act will be apprehended and dealt with full severity of the law".