Prince George, 2, meets the Obamas in his pyjamas

A handout picture released by Kensington Palace showing Prince George (right) meeting the President of the United States Barack Obama (centre) and First Lady Michelle Obama (behind) at Kensington Palace, London, with Britain's Prince William on April 22, 2016. PHOTO: REUTERS
A handout picture released by Kensington Palace showing Britain's Prince George of Cambridge (right) playing on a rocking horse with his mother Catherine, Duchess of Cambridge, as US President Barack Obama (right) and Prince William, Duke of Cambridge (second, from right) and US First Lady Michelle Obama (left) and Prince Harry (second from left) talk, on April 22, 2016. PHOTO: AFP
US President Barack Obama and first lady Michelle Obama visiting Kensington Palace for dinner with Britain's Prince William, his wife Catherine, Duchess of Cambridge, and Prince Harry in London, Britain, on April 22, 2016. PHOTO: REUTERS
Britain's Prince William, Duke of Cambridge (left) talks with US President Barack Obama (right) in a reception room at Kensington Palace in London, April 22, 2016. PHOTO: AFP
US President Barack Obama (second from left), First Lady Michelle Obama (centre) Britain's Prince William, Duke of Cambridge (second from right), his wife Catherine, Duchess of Cambridge (right) and Britain's Prince Harry (left) posing for a photograph at Kensington Palace in London, on April 22, 2016. PHOTO: AFP

Prince George, now nearly three, shook hands with US President Barack Obama at the Kensington Palace while in his pyjamas and dressing gown.

The President and first lady Michelle Obama crouched down to greet the young prince on Friday (April 22), photos released by the Palace showed.

Prince George, who is third in line to the throne, was dressed in baby blue gingham pyjamas and a white bathrobe monogrammed with his name - George - just before his bedtime.

He was also wearing slippers with aeroplane motifs on them.

The Obamas are stopping by Britain on a four-day visit as Barack Obama's second term nears its end. He will head to Germany next.

Earlier on Friday (April 22), they flew to Windsor Castle by helicopter to have lunch with Queen Elizabeth II, who just turned 90 on Thursday.

They then headed to Kensington Palace, in the centre of London, for dinner with the Duke and Duchess of Cambridge and Prince Harry.

It is the first time that any of the young royals have entertained a head of state privately, the Daily Mail said.

The Obamas arrived at Kensington Palace in the rain, and Prince George was spied waiting in the hallway.

"Oh look at you," Mr Obama was heard proclaiming as he walked in, CNN said.

The toddler stayed up for 15 minutes to greet the Obamas and thank them for gifts that were given to him previously, one of which was a soft toy of a Portuguese water dog - the breed that the Obamas own.

Photos also show the young prince riding on a rocking horse, a gift from the US first family when George was born.

A handout picture released by Kensington Palace showing Britain's Prince George of Cambridge (second from left) playing on a rocking horse while his mother Catherine, Duchess of Cambridge (left), US President Barack Obama (second from right) and Prince William, Duke of Cambridge (right) watch, on April 22, 2016. PHOTO: AFP

A palace official said: "He was able to show the president and first lady a rocking horse - given to George when he was born - and a stuffed toy - given to George when Princess Charlotte was born."

His sister, Princess Charlotte, was asleep, palace officials added.

The photogenic Prince George has stolen the hearts of many with his cherubic smile. On Thursday, his first photo for a royal stamp was released.

A handout image released on April 20, 2016, showing (from left) Britain's Prince Charles, Prince of Wales, Britain's Queen Elizabeth II, Britain's Prince George, and Britain's Prince William, Duke of Cambridge smiling during a photo shoot for the Royal Mail in 2015 in the White Drawing Room at Buckingham in London. PHOTO: AFP/ ROYAL MAIL/ RANALD MACKECHNIE

Prince George stood on foam blocks and beamed while holding the hand of his father, Prince William.

The Queen and Prince Charles are also in the picture, taken last summer in the White Drawing Room at Buckingham Palace by photographer Ranald Mackechnie.

The group photograph has been issued as a sheet that divides into four stamps, one for each of the royals, to mark the Queen's 90th birthday.

Join ST's Telegram channel and get the latest breaking news delivered to you.