karabakh was a part of soviet Azerbaijan republic that had an Armenian minority. in independence era of Azerbaijan and Armenia, Armenians invaded those regions and captured them illegally with the help of Russians. There is still a part of Russian army in Armenia to protect her.
As I have heard from my grand parents, who are azerbaijani from an area which is close to that region, these regions have been always azerbaijani lands and armenians have been minority, even I have heard that the Armenia itself, was mostly azerbaijani before Turkish-Armenia conflict, and even many of Armenians who live in Armenia republic, have migrated from turkey to Armenia after armenian-turkish conflict.
Armenians have always been a minority in those regions, they did not have the right to claim any land.