Under David he filled the position of treasurer. David appointed him because he thought that a man who was willing to become priest to an idol only in order to earn his bread, must be worthy of confidence. However sincere his repentance may have been, he relapsed into his former life when he was removed from his office by Solomon, who filled all position with new incumbents at his accession to the throne. Finally he abandoned his idolatrous ways wholly, and became so pure a man that the was favored by God with the gift of prophecy. This happened on the day on which the man of God out of Judah came to Jeroboam, for the grandson of Moses is none other than the old prophet at Beth-el who invited the man of God out of Judah to come to his house.