Success, he noted, should be measured not only by survival rates, but also by the causes of death for patients who did not make it, and the quality of life for those who did.
Dr. Rabeeah said that of the four patients who did not survive, two died from heart disease, one from cholera and one from meningitis. Some of the other former patients keep in touch and occasionally send photographs. Two girls from Sudan whom he separated in 1992, for example, recently visited after graduating from college.
The program is housed at the King Abdullah Specialist Children’s Hospital in Riyadh, which is run by the Saudi National Guard. It is driven by a mix of royal largess, Islamic charity and shrewd public diplomacy.
King Salman approves individual cases and the government foots the bills, giving patients and their families first-class plane tickets and free accommodations. The operations are heavily promoted by the local news media, and a reporter and a photographer for The New York Times joined Saudi journalists inside the operating theater for the Ghani girls’ surgery.
“It is a unique, rare anomaly that draws the attention of society and of anyone who wants to help, and I have become enormously attached to it,” said Dr. Rabeeah, 66, a grandfatherly Canadian-trained surgeon who has become something of a national hero.
A former health minister who treats members of the Saudi royal family, Dr. Rabeeah has become so associated with conjoined twins that his identical-twin daughters — the youngest of his eight children — once asked their mother, “When did our dad separate us?”
For the Ghani family, from the Swat Valley in Pakistan, the twins’ birth had been a mix of joy and trauma. Mr. Ghani said that he had left school in eighth grade to help his father farm, then came to Saudi Arabia to work, while his wife, Leena, stayed in Pakistan with their first three daughters, now 9, 7 and 4.
The couple were overjoyed when Ms. Ghani became pregnant with twins because they thought it gave them a better chance of having a son, Mr. Ghani said. When the girls were born conjoined, the doctors spirited them away and did not tell their mother, fearing it would shock her. She said she finally coaxed the news out of her 7-year-old daughter three days later.
Mr. Ghani returned from Saudi Arabia to search for a solution to a condition some of his neighbors saw as divine punishment.
“Me and my family were worried that the people around us would not know how to react,” he said.
The family eventually found a hospital in Islamabad that could care for but not separate the girls, who were becoming harder to manage as they grew. As with any twins, they ate more and soiled twice as many diapers as the couple’s previous babies, but Fatima and Mishal could not be separated when they tried to steal each other’s food.
“Sometimes they fight and sometimes they embrace,” Ms. Ghani said.
Eventually, a Pakistani doctor wrote to Dr. Rabeeah. The family flew to Riyadh early last month.
The trip was a major status upgrade for Mr. Ghani, who for 12 years had earned $530 a month as a driver for a Saudi family. Now he was effectively a guest of the king.
On the day of the operation, the couple watched via a big screen in an auditorium on another floor, he tapping out messages to relatives on his phone, she quietly weeping and reading the Quran.
In the operating room, built specifically for conjoined twins, with two sets of medical equipment, a team of 20 doctors, nurses and technicians cleaned the girls and applied anesthesia, then marked their bodies and began to cut. The team soon fell into a rhythm, talking softly over the whir of the machines and the overlapping beeps of the two heart monitors.
The hardest part was splitting the liver, which turned out to be essentially two livers fused into one, making the separation easier, Dr. Rabeeah said. Five doctors clustered over the girls, some holding back the skin while one cut and cauterized, and another stitched up arteries to prevent blood loss.
Upstairs in the auditorium, nurses on break dropped by to watch the operation, as did members of the National Guard in camouflage uniforms and red caps.
In the front row sat Nabil Abdulhaq, a Yemeni school inspector whose son Ahmed had been born two years earlier with two bodies but a single head, heart and set of lungs. Mr. Abdulhaq showed a picture on his phone of the boy lying on a bed with an extra half-torso extending from his chest, with two extra arms and legs.
Now Ahmed, whom Dr. Rabeeah operated on in February, was running around the auditorium, gleefully swiping toys from other children.
Back in the operating room, having divided the liver, the doctors cut through the girls’ abdominal muscles and started on the last strip of skin that connected them.
Smoke rose from the table and the smell of seared flesh filled the air. Then Dr. Rabeeah counted down from five, finally proclaiming, “Zero! Praise God!” as the girls were separated.
The nurses burst into applause.
Then, for the first time in their lives, the girls were placed on separate beds. The team sewed them up, and plastic surgeons gave each one a belly button. Once stabilized, the girls were wheeled into a hallway to meet their parents, a crowd of well-wishers, the Pakistani ambassador and a local television crew that was broadcasting live.
“You can kiss them,” Dr. Rabeeah said.
Mr. Ghani did, then stepped back, bowed down and pressed his forehead to the tile in thanks.