After the death of his elder brothers Amnon and Absalom, he became heir-apparent to the throne, but Solomon, a younger brother, was preferred to him.
He became heir-apparent to the throne. This was after the death of his elder brothers Amnon. This was after the death of his elder brothers Absalom. Solomon was preferred to him. Solomon was a younger brother.