Queen Elizabeth II appeared to criticize the global lack of action on climate change when her comments were picked up on a microphone at an event on Thursday.

The 95-year-old British monarch was filmed on a phone as she visited Cardiff to open the Welsh parliament.

At one point, speaking to her daughter-in-law Camilla, Duchess of Cornwall, and parliament presiding officer Elin Jones, she said "I’ve been hearing all about COP … I still don’t know who’s coming."

On the recording, parts of which are inaudible, the queen also appears to say it is "irritating" when "they talk, but they don’t do."

Britain's Queen Elizabeth II, accompanied by Prince Charles and Camilla, Duchess of Cornwall, second right, attends the opening ceremony of the sixth session of the Senedd in Cardiff, Wales, Thursday Oct. 14. 

Britain's Queen Elizabeth II, accompanied by Prince Charles and Camilla, Duchess of Cornwall, second right, attends the opening ceremony of the sixth session of the Senedd in Cardiff, Wales, Thursday Oct. 14.  (Jacob King/PA )

The queen is due to welcome leaders from around the world to COP26, a United Nations climate conference in Glasgow, Scotland, at the end of the month. Several heads of state or government, including China’s Xi Jinping, have not said whether they will attend.

A government minister, Transport Secretary Grant Shapps, said the queen’s comments had not been intended for broadcast.

"I think comments made in private should stay private, but we all share the desire to see progress made and we know there will be hundreds of leaders coming to Glasgow for COP," he told Sky News.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

In Britain’s constitutional monarchy the queen is meant to be above politics, and she rarely expresses opinions in public.

Her son and heir, Prince Charles, though, has long been outspoken on environmental issues. And Charles’ son Prince William has also taken up the cause, backing the Earthshot Prize for environmental innovation that will be awarded on Sunday.

In an interview with the BBC broadcast Thursday, William criticized space tourism, saying the world’s greatest minds should focus on fixing the Earth instead.

CLICK HERE TO GET THE FOX NEWS APP

His comments were aired a day after the 90-year-old "Star Trek" actor William Shatner became the oldest person to fly to space, in a rocket funded by Amazon founder Jeff Bezos.

The Associated Press contributed to this report.