David was a prophet and knew that God had promised with an oath that he would place one of David’s descendants on his throne.