Psalm 50:14-15

14 Offer unto God thanksgiving; and pay thy vows unto the most High:

15 And call upon me in the day of trouble: I will deliver thee, and thou shalt glorify me.