The Duke of Edinburgh told a nurse from the Philippines that her country must be "half empty" - because so many of her compatriots have come to the UK to work for the NHS.
He made the remark during a visit to Luton and Dunstable Hospital where he unveiled a £5.5m cardiac centre.
"The Philippines must be half empty - you're all here running the NHS," the prince told the nurse, who laughed.
A hospital spokesperson said the duke's visit had been "hugely motivational".
The 91-year-old royal, who called himself "the world's most experienced curtain puller", was said to be in a "jovial" mood and asked when the hospital would get a helipad to save him a journey by car.
The hospital spokesperson would not comment on the duke's conversation with the nurse but said the hospital had not held a recent recruiting campaign in the Philippines, which had a population of 94.8 million in 2011.
"Luton is a very cosmopolitan town and the working staff at Luton and Dunstable Hospital reflects that," the spokesperson said.
The Nursing and Midwifery Council said just over 16,000 of the 670,000 nurses in the UK were from the Philippines.
The Duke of Edinburgh is well known for his outspoken and sometimes controversial comments.
During a state visit to China in 1986, he told a group of British students: "If you stay here much longer, you'll all be slitty-eyed".
In 1994 he asked an islander in the Cayman Islands: "Aren't most of you descended from pirates?"
Four years later, speaking to a student who had been trekking in Papua New Guinea, the duke said: "You managed not to get eaten, then?"
Responding to Tuesday's visit to Luton, Buckingham Palace said it would not comment on a private conversation.