Pakistan launched its deadliest attack on Afghanistan in months, with Islamabad saying on Monday it killed dozens of militants as the Afghan government reported civilian casualties.