The People of the Graves have more right to the Land than you all
Question :
I inherited a house from my mother and that house was demolished and its structure rebuilt. Beside the house there are many graves. While we were digging its foundation, we stumbled across some decayed bones that appeared to be from the neighboring graves. So, I took these bones and buried them in another place far away from the house. Then, the construction of the house was completed with our houses all being next to the graves. We inherited these houses from our ancestors and we do not own any houses other than them or any land to build houses on away from the graves. Therefore, do we have the right to live in this house and may we move these bones from their place to a new place without there being any sin on us for doing so?
Answer:
If these graves were graves of Muslims, then the people in them have more right to the land than you all. This is because when they were buried in them, they owned them, and it is not permissible for you to build your houses over the graves of the Muslims. It is obligatory on you, if you are certain that this place has graves in it, to stop building and leave the graves without any structure over them. The fact that you all do not have houses (other than these) does not mean that you can take the homes of others among the Muslims. For verily, the graves are the homes of the deceased. It is not allowed for you all to live there as long as you know that there are deceased people there.
Source:
Ash-Shaykh Ibn 'Uthaimin
Fatawa Islamiyah, Vol. 3 Page 144