(Recasts with announcement of ceasefire) PARACHINAR, Pakistan, April 12 (Reuters) - Warring Sunni and Shi'ite Muslim tribes announced a ceasefire in a Pakistani tribal region near the Afghan border on Thursday after days of fierce clashes that killed about 40 people. The clashes between the followers of two Muslims sects erupted in Kurram tribal region late last week after an exchange of insults during a religious procession in Parachinar, the region's main town. Authorities imposed a curfew in Parachinar on Friday and called the army to quell the violence and engaged a traditional tribal jirga or council of elders to mediate peace between the two sides. The jirga announced the truce after lengthy talks with the warring sides. "Both parties have entrusted the jirga to announce a ceasefire and they have given us an assurance that they will not violate the truce," Zakir Mohammad, a member of the jirga, told Reuters. Sahibzada Mohammad Anis, the region's top administrator, said fighting had largely died down after the ceasefire. "Sporadic firing is going on in some parts of Kurram but it will stop once fighters come to know about the ceasefire." Sectarian violence has bedevilled Pakistan since the 1980s but the latest clashes have erupted in tribal lands on the Afghan border where security forces are already battling al Qaeda and Taliban-linked militants and hunting for their leaders. On Wednesday, suspected Sunni Muslim tribesmen raided a Shia Muslim village and killed five people, raising the death toll to nearly 40. The army shelled positions of the rival factions after gunmen raided Chardiwar village. Most of the ethnic Pashtun tribesmen in Kurram are Shia, although most Pashtuns, who inhabit both sides of the rugged Afghan-Pakistan frontier are Sunni. Pakistan has also seen sectarian violence in major cities and towns in recent years although the majority of Sunnis and Shi'ites, which account for about 15 percent of the country's 160 million people, live in peace. In a separate incident, four gunmen and a paramilitary soldier were killed on Thursday in a clash in the gas-rich southwestern province of Baluchistan, near the Iranian border, a security official said. The identity of the gunmen was not known. Nationalist militants in Baluchistan have for decades waged a low-scale insurgency for political autonomy and greater share of profits from the province's resources. Smuggling gangs also operate near the Iranian border.