So they supported the kingdom of Judah and for three years they were loyal to Rehoboam, son of Solomon, because they followed the way of David and Solomon.