KHAR, Pakistan, March 27 (Reuters) - Gunmen on motorcycles killed four people, including two Pakistani intelligence officials, in an area near the Afghan border on Tuesday. Masked men on two motorcycles ambushed a vehicle carrying officials of Pakistan's Inter-Services Intelligence (ISI) agency and civilians near Khar, the main town in the Bajaur region, said senior district government official Mawad Khan Afridi. "Four people including two ISI officials were killed on the spot while two civilians were wounded," Afridi said. Tribesmen in Bajaur, which is known as a safe haven for al Qaeda-linked militants, gave authorities on Monday a written assurance they would not give shelter to foreign militants. Military spokesman Major-General Waheed Arshad said security forces were investigating the attack. Foreign militants were not believed to have been involved and it would not sabotage ties between the tribesmen and authorities, he said. Many al Qaeda and Taliban members fled to Pakistan's semi-autonomous border lands and were given shelter by the Pashtun tribes who inhabit both sides of the frontier after U.S.-led forces ousted the Taliban in Afghanistan in 2001. Bajaur is the most north-easterly of Pakistan's seven tribal regions and is opposite the Afghan province of Kunar where U.S. troops have been battling al Qaeda and Taliban insurgents. In January last year, a CIA-operated drone aircraft carried out an attack in Bajaur aimed at al Qaeda deputy leader Ayman al Zawahri. About 18 people, including some al Qaeda operatives, were killed but Zawahri was not present. In October, Pakistani army helicopters raided a madrasa, or Islamist school, in Bajaur killing about 80 people, the highest number of suspected militants killed in a single assault.