Polite past-tense expression of gratitude, used after someone has done something for you. More formal than ありがとうございます.
Thank you very much for all your help the other day.
Thank you for coming.
Kanji spelling; it is a high-priority form.
Alternate kanji spelling with okurigana 有り難う.
From 有難う (ありがとう, 'thank you') + ございました, the polite past form of ござる ('to be'). Literally 'it was difficult to exist', expressing that the favor was rare and precious.