1 Kings 8:50

And forgive thy people that have sinned against thee, and all their transgressions wherein they have transgressed against thee, and give them compassion before them who carried them captive, that they may have compassion on them:

This verse belongs to Solomon's prayer for Israel at the dedication of the temple, within the larger dedication passage of 1 Kings 8:22-53. That dedication prayer was offered with a felt need for divine power. The larger passage shows that Israel's dependence was in the God of Israel, that the many builders built a large and grand house, that God honored them because they had built Him a sanctuary where they could meet to worship Him, and that those who worshiped Him sincerely had His blessing.

The prayer shows that God meets His people by His Spirit when they gather for worship, yet He is not confined to the temple and may be worshiped wherever His people are. The verse looks ahead to Israel being carried captive because of sin, and provides that the captive people may turn back to God, repent, confess their wrongdoing, and pray to Him from the land of captivity. Captivity does not close the way to God, since faithful people can approach Him through prayer and supplication wherever they are.

In that situation the people ask God to forgive their sins and all their transgressions wherein they have transgressed against Him, and to give them compassion before those who carried them captive, so that their captors will treat them with compassion. God hears that prayer from captivity, forgives the people, and upholds their cause. In the same dedication prayer Solomon also asked that the people's hearts would remain wholly given to the Lord.

Israel's later apostasy stood in contrast to that prayer for wholehearted loyalty. The prayer also stands in contrast to Solomon's own later course, when after a close relationship with God he departed into idolatry and forsook the temple to worship idols. Solomon's turn away shows that even a person who had received precious light and witnessed divine power could turn away from God.