 From 1997, the President Aslan Maskhadov replaced the secular Chechen government with an Islamic government based on sharia law and declared Chechnya an Islamic republic.Kadyrov was a powerful official in independent Chechnya and the Kadyrovtsy were maintained for his own interests, however, he was an opponent of the Wahhabism which the increasingly influential foreign jihadist fighters of the Arab Mujahideen in Chechnya adhered to.Kadyrov abandoned the Chechen Republic of Ichkeria shortly after the outbreak of the Second Chechen War in August 1999, when the country was invaded by Russian federal troops in response to the Dagestan War, and his offer to defect was accepted by the Russian government.