US President Donald Trump's decision to strike a Syrian government base in retaliation for what he said was a chemical attack comes four years after his predecessor, Barack Obama, faced a similar challenge in Syria - and chose to back down.

A suspected poison gas attack on Tuesday in the rebel-held town of Khan Sheikhoun in Syria's Idlib province killed at least 86 people, including 27 children.

Trump accused Syrian President Bashar al-Assad of having "choked" his own citizens, and said the situation had been by the inaction of the previous Obama administration.

However, when Obama had vowed that the use of such weapons would "change my calculus" to justify military intervention in Syria, Trump repeatedly took to Twitter to heavily criticise him - and called him a "foolish leader".

Here is a selection of tweets by Trump about US intervention in Syria before he became president.

What will we get for bombing Syria besides more debt and a possible long term conflict? Obama needs Congressional approval. — Donald J. Trump (@realDonaldTrump) August 29, 2013

If Obama attacks Syria and innocent civilians are hurt and killed, he and the U.S. will look very bad! — Donald J. Trump (@realDonaldTrump) August 30, 2013

What I am saying is stay out of Syria. — Donald J. Trump (@realDonaldTrump) September 4, 2013

AGAIN, TO OUR VERY FOOLISH LEADER, DO NOT ATTACK SYRIA - IF YOU DO MANY VERY BAD THINGS WILL HAPPEN & FROM THAT FIGHT THE U.S. GETS NOTHING! — Donald J. Trump (@realDonaldTrump) September 5, 2013