When Israel declared independence in 1948, many Palestinians still lived within the borders of the new state.