They tricked the king into making a new law that whoever prayed to God would be thrown into a den of lions. They knew Daniel believed in God and would pray no matter what. When they saw Daniel praying, they told the king.