In August 1999, Russia launched the Second Chechen War in response to the Invasion of Dagestan by the Islamic International Brigade. Dagestan borders Chechnya to the east, and as part of the operation Russian troops entered Chechnya on 1 October to restore federal control over the country, effectively ending its "de facto" independence. In March 2000, during the early phase of the war, Barayev reportedly betrayed the Chechen field commander Ruslan Gelayev to the Russian military forces, resulting in the massacre of Gelayev's forces in the Battle of Komsomolskoye. According to another version, Barayev and his men merely bribed their way out of Komsomolskoye while leaving Gelayev and his people to their fate. The incident led to the declaration of revenge on the part of Gelayev, whose fighters then blew up several houses belonging to Barayev in his home village of Alkhan-Kala near Grozny, killed a number of his men, and even attempted to assassinate Barayev in Ingushetia. According to federal authorities, more than 40 Chechens died as a result of these clashes.