The book of Ezra is filled with clear evidence of God’s power over earthly kings. Proverbs 21:1 states, The king’s heart is in the hand of the LORD, like the rivers of water; He turns it wherever He wishes. In Ezra 1:1-2, we see that the LORD stirred up the spirit of Cyrus king of Persia. He proclaimed, All the kingdoms of the earth the LORD God of heaven has given me. And He has commanded me to build Him a house at Jerusalem which is in Judah. This is a fulfillment of the end of the 70 years of captivity in Babylon which Jeremiah predicted (Jer. 25:11; 29:10-14).
For His reasons, the Lord allows King Artaxerxes to stop the work of rebuilding the temple due to an accusation against the Jews (4:18-24). After 16 years, King Darius commanded that the archives be searched. A scroll was found which revealed that the building project was legitimate. It was initiated by King Cyrus (6:1-11).
We also see how the Lord moved King Artaxerxes to grant Ezra his request to beautify the house of the LORD in Jerusalem. Amazingly, the king footed the bill for this project! The fascinating letter from Artaxerxes to Ezra is recorded in 7:12-26. I have not seen any evidence that these kings were followers of the God of Israel, but nonetheless, He directed them, as He does the hearts of all kings.
In contrast, we see a description of Ezra’s heart. For Ezra had prepared his heart to seek the Law of the LORD, and to do it, and to teach statutes and ordinances in Israel. (7:10) This was the reason that the good hand of his God was upon him. (7:6; 7:9). In fact, Ezra had explained this truth to the king, and thus, he and the people made the dangerous trip to Jerusalem without asking for his protection. He says, For I was ashamed to request of the king an escort of soldiers and horsemen to help us against the enemy on the road, because we had spoken to the king, saying, “The hand of our God is upon all those for good who seek Him, but His power and His wrath are against all those who forsake Him.” So we fasted and entreated our God for this, and He answered our prayer. (Ezra 8:22-23)
Yes, we are instructed to pray for those in authority (I Tim. 2:1-5), but our primary responsibility is to keep our hearts with all diligence (Prov. 4:23) and seek first the kingdom of God and His righteousness (Matt. 6:33).