1 Kings 8:39
Then hear thou in heaven thy dwelling place, and forgive, and do, and give to every man according to his ways, whose heart thou knowest; (for thou, even thou only, knowest the hearts of all the children of men;) Then hear thou in heaven thy dwelling place, and forgive, and do, and give to every man according to his ways, whose heart thou knowest; (for thou, even thou only, knowest the hearts of all the children of men;)
This is Solomon's prayer at the dedication of the temple he was employed to build, offered for the people amid hardship. In that prayer he asked that their hearts be wholly given to the Lord. The temple itself was built by many people and was large and grand, and God honored Israel because they had built Him a sanctuary where they could meet to worship Him. Their dependence was in God, and those who worshiped Him sincerely had His blessing.
He offered this most remarkable prayer as he entered upon his work with remarkable manifestations of divine power and precious views of the divine character, showing his sense of the need for divine power. At that time he was closely related to God. That devotion stands in stark contrast to his later course, for the light he had did not save him when he afterward forsook the very temple to worship idols and separated from God.
The prayer teaches that God hears from heaven, His dwelling place, rather than being confined to a human-built temple. He meets His people by His Spirit when they gather for worship, visits and encourages them wherever they are, and gives His children the privilege of worshiping Him in every place. He, even He only, knows the hearts of all people, reading their hearts, intentions, and purposes. He knows what is in every person's heart.
Solomon asks Him to hear, forgive, and do, dealing with each person according to his ways as He knows the heart. The prayer calls people to fear God and walk in His ways. Because He understands the heart, never makes a mistake, and judges righteously, private family secrets and difficulties should be brought before Him rather than communicated to ministers.
Since humans cannot read the heart of a sick person, prayer for the sick acknowledges that lack and asks God, who knows whether it is for the good of the sufferer's soul and for the glory of His name to raise him to health, to show compassion and cause healthy action in the system. After all human skill has done, the healing work is entirely His, laying the case at His feet for Him to work as only God can work, arresting disease and healing the sufferer if it is for His glory. Even then there is to be more earnest work with sanctified wisdom to cooperate with Him in recovery through the means His own hand has provided. The Lord recognizes efforts made in harmony with the Holy Spirit, and those who humble themselves before Him and determine to do His will find that He is merciful.
He sees when ways are an offense to Him, when self has supremacy, and when the Holy Spirit is grieved. When a high opinion of self puts a person in serious danger, it brings danger of fatal deception, criminal rashness, and confounding the spirit of delusion with the spirit of truth.