"When I Was Your Man" is a song by Bruno Mars from his second studio album, Unorthodox Jukebox, released in 2012. It was released as a single to mainstream radio in the United States on January 15, 2013. The song is a piano ballad where Bruno Mars reflects on regret and heartbreak, lamenting how his pride and selfishness led to him losing his girlfriend. He expresses hope that her new partner will give her the love and devotion he failed to provide. The song showcases Mars's vocal prowess and emotional depth. The song was written by Bruno Mars along with Philip Lawrence, Ari Levine, and Andrew Wyatt. It became a commercial success, topping the US Billboard Hot 100 chart and reaching the top ten in several other countries. It was certified multi- platinum in several regions and was one of the best-selling digital singles worldwide in 2013. The music video features Mars as a lonely balladeer sitting at a piano. Mars has mentioned that the song was written for his then- girlfriend Jessica Caban as a reflection on a pre-fame heartbreak. Despite the song's sad theme, their relationship lasted. Mars has described the song as one of his most honest and vulnerable, highlighting the simple things he regrets not doing in the relationship, such as buying flowers and holding hands.