Facebook has apologised after accidentally declaring the Philippines was at war.

The social media giant posting a greeting on Filipino Independence Day - but their flag was upside down - which officially means the country is at war.

And social media users were quick to point out the unfortunate gaffe which they dubbed a "flag fail".

In a statement to AFP, Facebook said: "This was unintentional and we're sorry.

"We care deeply about the community in the Philippines and in an attempt to connect people on Independence Day, we made a mistake."

Facebook is not the first to cause a stir over an inverted Philippine flag.

In 2010, America had to apologise for mixing up the blue and red sections of the flag during a meeting between President Obama and South East Asian leaders.