When the word was out that Jeroboam was back and available, the assembled people invited him and inaugurated him king over all Israel. The only tribe left to the Davidic dynasty was Judah.
When Rehoboam got back to Jerusalem, he called up the men of Judah and the tribe of Benjamin, a hundred and eighty thousand of their best soldiers, to go to war against Israel and recover the kingdom for Rehoboam son of Solomon.
At this time the word of God came to Shemaiah, a man of God:
"Tell this to Rehoboam son of Solomon king of Judah, along with everyone in Judah and Benjamin and anyone else who is around:
This is God's word: Don't march out; don't fight against your brothers the Israelites; go back home, every last one of you; I'm in charge here." And they did it; they did what God said and went home.
Jeroboam made a fort at Shechem in the hills of Ephraim, and made that his headquarters. He also built a fort at Penuel.
But then Jeroboam thought, "It won't be long before the kingdom is reunited under David.
As soon as these people resume worship at The Temple of God in Jerusalem, they'll start thinking of Rehoboam king of Judah as their ruler. They'll then kill me and go back to King Rehoboam."
So the king came up with a plan: He made two golden calves. Then he announced, "It's too much trouble for you to go to Jerusalem to worship. Look at these - the gods who brought you out of Egypt!"
He put one calf in Bethel; the other he placed in Dan.
This was blatant sin. Think of it - people traveling all the way to Dan to worship a calf!