Photo sharing site Instagram has apologised for removing a picture of two men kissing on their wedding day, after it was flagged as “inappropriate”.

Alberto Guzman posted the a picture of himself and husband Janeiro on Sunday, to celebrate pride rallies across the US.

However, the picture was flagged as inappropriate by a user, and the site pulled it down.

Guzman, a hairdresser and stylist, said: “I posted this photo of my wedding yesterday and Instagram took it off my album for being ‘inappropiate’, and on gay pride day of all days.”

Instagram’s community guidelines bans photos that contain nudity, mature content, prohibited or illegal content or extreme violence or gore, but the same-sex kiss did not violate the rules of the website.

A statement from the company, which was bought by Facebook in 2012, said: “When our team processes reports from other members of the Instagram community, we occasionally make a mistake.

“In this case, we wrongly removed content and rectified the error as soon as we were notified. We apologize for any inconvenience.”

Facebook has made a number of similar mistakes itself in the past few months.

In May, a picture of a lesbian kiss was removed because it was found to constitute “nudity or pornography”, and Queer as Folk producer Del Shores was banned from the website after celebrating marriage equality.

In December, more than 100 users were banned from Facebook for posting a photo of two men kissing.