Thousands of Afghans congregated in Kabul on Monday for a rare consultative meeting aimed at finding ways to negotiate a peace deal with the Taliban and end Afghanistan's war. The four-day consultative grand assembly, known as a Loya Jirga, is an attempt by President Ashraf Ghani to influence peace talks between the United States and the Taliban, which the Taliban have excluded his government from. "It is a proud moment for me to have representatives from all over the country here and today we are gathered to speak about the peace talks," Mr Ghani said in an opening ceremony in huge tent set up for such assemblies in central Kabul. A Loya Jirga is aimed at building consensus among various ethnic groups and tribal factions and is traditionally convened under extraordinary circumstances. This week's meeting, being attended by 3,200 trial elders, and community and religious leaders from all 34 provinces, aims to set out Kabul's conditions for any peace deal. But opposition political leaders and government critics, including former president Hamid Karzai, are boycotting the assembly accusing Mr Ghani of using it as a platform to boost his status as leader in an election year. The US talks with the Taliban in Qatar are part of US President Donald Trump's efforts to end America's longest war, which began when US-backed forces ousted the Taliban weeks after the September 11, 2001, attacks on the United States. Since October, US and Taliban officials have held several rounds of talks aimed at ensuring a safe exit for US forces in return for a Taliban guarantee that Afghanistan will not be used by militants to threaten the rest of the world. But the Taliban have refused to talk to Mr Ghani's government, denouncing it as foreign "puppet", and intense fighting is going on in various parts of the country, with the Taliban controlling and influencing more territory than at any point since 2001. Mr Ghani invited the Taliban to the Loya Jirga but they have urged people to boycott it, denouncing it as an attempt by the Western-backed government to deceive the country and extend what the Taliban see as its illegitimate rule. "Do not participate in the enemy's conspiracy under the name of Jirga, instead find ways to further sideline the shaky administration of Kabul," Taliban spokesman Zabihullah Mujahid said in a statement. In the past, the Taliban have fired rockets at the Loya Jirga tent, and much of Kabul was under virtual lock down on Monday, amid a massive security operation for the meeting. Mr Ghani, who hopes to secure a second term in presidential election set for September, is feeling isolated from the peace process and the Loya Jirga was a bid to broaden his support, Western diplomats in Kabul said. "He wants to prove that he has the ability to secure a peace deal and also enjoys the support of Afghans," said one diplomat. "Ghani fears the opposition is using the Taliban refusal to engage with him to undermine him politically," the diplomat said.