Barack Obama has taken aim at Donald Trump at an event put on for journalists, politicians and celebrities.

He was speaking at the White House Correspondents’ Dinner, an annual meeting that’s been running since 1920.

In the crowd were a number of famous faces, including actors Will Smith, Morgan Freeman and Rachel McAdams.

To applause and laughter from the audience, the President said of the Republican front runner: “There’s one area where Donald’s experience could be invaluable, and that’s closing Guantanamo, because Trump knows a thing or two about running waterfront properties into the ground.”

Actress Helen Mirren arrives on the red carpet for the annual White House Correspondents Association Dinner in Washington

Dame Helen Mirren dressed in purple at the dinner, in tribute to Prince

Mr Obama also made reference to his recent trip to the UK, where he met members of the Royal Family.

He told the crowd that he had lunch with Her Majesty the Queen and even met one of the younger members of the family.

“Prince George showed up to our meeting in his bathrobe. That was a slap in the face,” Mr Obama joked.

There was also praise for British actress Dame Helen Mirren, who he described as “awesome”.

For political journalists, the dinner is a chance to share a joke with the President.

Actress Emma Watson attends the White House Correspondents' Association annual dinner in Washington, U.S.

Actress Emma Watson also appeared to have a ball at the White House

This year, they compiled a “bloopers” tape as a memento of his time in office.

It showed the President’s car stalling, him falling over and forgetting the names of reporters interviewing him.

With just six months until the US election, there was a special mention for both Hillary Clinton and Bernie Sanders.

“Hillary trying to appeal to young voters is a little bit like your relative who just signed up to Facebook,” he said.

“‘Dear America, did you get my poke? Is it appearing on your wall? I’m not sure I’m using this right’.”

Of Mr Sanders, he said: “He recently had a hernia operation.

“His doctors say it’s his own fault, for trying to lift the hopes of the disenfranchised. You gotta stretch before you do that, Senator.”

This will be the last time Mr Obama speaks at the Correspondents’ Dinner.

He will stay in Washington DC until his youngest daughter finishes high school.

The President joked about what job he might go on to next, but of course, that is anyone’s guess.