CUETZALAN DEL PROGRESO, Mexico — Rescuers on Thursday pulled all six members of a British exploring team from the cave where they became trapped two weeks ago by rising water.

The cavers appeared tired but looked far from haggard. They asked journalists and rescue workers if anybody had brought beer and said they were looking forward to seeing their loved ones.

"We're feeling quite cheerful," said Toby Hamnett, one of those rescued. The extraction effort took divers about six hours, including a break to resupply compressed air tanks.

Three of the spelunkers were rescued in the afternoon and the others were pulled out in the evening by British and Mexican divers

The explorers, who became trapped March 17, were members of Britain's Combined Services — which encompasses the army, navy and air force.

Even as the crisis was coming to an end, Mexico demanded that Britain better explain what the cavers — five of whom were members of the military — were doing in this country.

Mexico expressed "profound concern" that the military cave explorers had failed to seek permission to enter the country for scientific explorations.

The text of a diplomatic note asked "a detailed explanation of the type of activities" the group was carrying out "and about the objectives of their investigation."

One Mexican newspaper suggested the explorers might have been hunting for uranium.

Britain's Foreign Office said in London that the trip was "strictly a caving expedition, had no other purpose and any suggestions to the contrary are completely unfounded."

British officials said similar teams had been openly visiting for 20 years and were helping to map the massive cavern system.

Britain's Ministry of Defense said the men were on an "official military adventurous training expedition" of a military caving club, though not a formal military exercise.

Some Mexican news media expressed irritation that the cavers had shrugged off repeated Mexican offers of help at the same time they were calling in rescue divers from Britain.

Scores of heavily armed state policemen guarded the cave site at the bottom of a steep canyon at the end of a single-file trail through farm and forest land bursting with springs and rivulets of water.

As a safety precaution, half of the cave diving team was above ground when heavy rains triggered floods blocking the cave's entrance on March 17.