“When I Was Your Man” is a song by American singer-songwriter Bruno Mars, from his second studio album, Unorthodox Jukebox (2012). The song was written by Mars, Philip Lawrence, Moe Faisal, Ari Levine and Andrew Wyatt, while production was handled by The Smeezingtons. It was released as the third promotional single taken from the album and as the second official single. The song is part of the soundtrack of the Brazilian soap opera Amor à Vida.
“When I Was Your Man” is a soul and pop piano ballad about a pre-fame heartbreak as he regrets a girl that he let get away, expressing his earnest hope that her new man is giving her all the love and attention he was unwilling, or unable to provide when they were together. It received positive reviews from music critics, who praised Mars’s vocals and named it a “vulnerable and emotional ballad”.