The last four of the 12 Thai boys and their coach, trapped inside a flooded cave, were rescued by a team on Tuesday bringing to a successful end an extraordinarily perilous mission which lasted for more than two weeks. The "Wild Boars" soccer team, aged between 11 and 16 was trapped inside the cave on June 23 along with their 25-year-old coach in the northern province of Chiang Rai when a monsoon downpour flooded the tunnels. Even though the team was located by British divers huddled in darkness on a muddy bank in a partly flooded chamber several kilometres inside the Tham Luang cave complex last week on Monday, the rescue operation was launched after a lot of thought on Sunday. On the first day, four boys were rescued while the others were brought out over the next two days. Celebrations were tinged with sadness as a former Thai navy diver lost his life during the operation while on a re-supply mission inside the cave. The operation brought the world together as volunteers came from as far away as Australia and the United States to help with the effort to rescue the boys. The United States military personnel also helped in the operation. SpaceX and Tesla chief Elon Musk even built and left a mini-submarine on the spot that he had designed to carry the trapped football team to safety. It was never used though. If it wasn't for a collective effort, the operation probably would not have been possible. How were Thai boys rescued from the cave? The team was located by the rescue divers nine days after it found itself trapped deep inside the cave. They were sheltering on a ledge surrounded by water. About two miles of narrow, flooded passageways separated their refuge from the main entrance. Efforts to pump water out began immediately as authorities tried to take advantage of a break in monsoon rains. The authorities were successfully able to reduce the water levels in the first section of the cave by 40% within the first two days. This made it possible to walk through up to chamber three from the entrance. The boys were also provided with foil blankets, food, light and seven divers \u2013 including medics \u2013 to keep them company. A new challenge appeared on Saturday (July 7) when authorities declared that they had a window of only 3 to 4 days to rescue the boys because rainfall was forecast to grow more intense. A day later, a doctor with cave-diving experience went into the chamber and approved the boys for the operation. The children had never used the diving equipment before and some of them were even given swimming lessons while they were inside the cave. Divers with specialist breathing equipment reached the group through a series of water-filled passages and the boys were brought out the same way. Each boy was accompanied by two divers - one holding him close under the body - other following behind. These divers guided them through the dark using ropes. There was a high risk involved as the rescuers had to take off their air tanks and squeeze the boys and the tanks through the narrow sections of the cave. The boys were eventually brought out safely. What was their condition? Most of the boys rescued from the cave lost an average of 2 kg (4 pounds) during their 17-day ordeal but were generally in good condition and showed no signs of stress. "From our assessment, they are in good condition and not stressed. Most of the boys lost an average of 2 kg," Thongchai Lertwilairattanapong, an inspector for Thailand's health department said. The Indian connection Experts from a Pune-headquartered firm gave technical support in the operation. The company was recommended to the Thai authorities by the Indian Embassy. Kirlosker Brothers' Limited, which has expertise in "dewatering", sent teams from its offices in India, Thailand and the United Kingdom to the site. Its experts were on site at the cave in Tham Luang since July 5 and offered "technical know-how and advice on dewatering and pumps involved in the rescue operation," said a KBL release. The KBL had also offered to provide four specialised high capacity Autoprime dewatering pumps, which were kept ready at Kirloskarvadi plant in Maharashtra to be airlifted to Thailand, it said.