By now, millions of people have seen a photo of a 2-year-old girl screaming while a U.S. border agent pats down her mother. Taken last Tuesday, the image has become a symbol of the Trump administration’s new “zero tolerance” border policies, which have caused hundreds of children to be removed from the parents who brought them here.

What you didn’t see was John Moore, crouched 6 feet away, who had to literally catch his breath after taking the picture because it pulled something out of him.

An award-winning photographer for Getty Images, Moore has documented wars, diseases and refugee crises around the world. This is the story of how he found a little girl and her mother beside the Rio Grande last week and took what could be one of the most high-impact photos of his career.

In some ways, the past 10 years had prepared Moore for the shot, but in most ways, nothing could.

He had been photographing the American migrant crisis for Getty Images since the end of the George W. Bush administration, ever since he returned from covering war zones overseas. He had ridden with destitute families through Central America on the roofs of anarchic freight trains and followed U.S. border patrols as they chased men through Texas scrubland.

He had studied the crisis from so many angles. He knew the secret routes through the deserts, the safest crossings on the Rio Grande and the finer points of the U.S. Border Patrol’s search-and-detention protocols.

He knew that when loners crossed the river by day, they tended to run or hide from Border Patrol. But the large groups that crossed at night often surrendered themselves to the first U.S. agents they found.

The night-crossers were often families, exhausted and terrified from their journeys, seeking asylum from whatever terror had driven them from home.

It was night now. Moore and a unit of Border Patrol guards crouched among the trees on the Rio Grande’s northern bank, listening to the rafts below. He could hear at least four of them sloshing across the river, and just barely make out a dozen or so figures on the two nearest boats.

“It was very hard to see them,” he remembered. “It was a moonless night, almost impossible to photograph.”

But he needed photographs. He’d been waiting all of Tuesday afternoon and evening for them, because he knew what waited for these families on his side of the river.

While they had been evacuating their homes and traveling — some for weeks — the United States had changed the rules. Pleas for asylum that had been accepted for years might now be rejected. Mothers and fathers, who would have been released to await court hearings, would now be jailed. Their children would be seized and held from them by a foreign government.

The American public had only just learned this. Moore and the Border Patrol agents who hid with him on the banks of the Rio Grande knew it. But the people on the rafts … “These people had no way to know that,” Moore said.

He listened as they stepped off the boats and crunched over fallen branches, toward a dirt road that led to the town of McAllen at the southern tip of Texas. He heard a child cry in the woods, and knew what the boy had likely faced, and still must face, and it broke his heart a little.

And suddenly the border agents were on the move, and Moore with them, piling into trucks, engines roaring and spotlights glaring.

There was no more hiding now. It was time to meet the people.

There were dozens of them, though it was hard to count in the dark. When the guards’ lights hit them, Moore saw that they were almost entirely women and children. It was about as pure a family exodus as he had seen in his career.

On their faces were mixtures of relief and fear. Sometimes just one or the other. “There was a boy, about a 10- or 12-year-old boy, who was visibly terrified,” Moore recalled.

Officially, under his agreement with Border Patrol, he was there only to document — not talk to the detainees. But Moore had two daughters nearly the same age as this boy. He had a toddler who sometimes cried as the boy had been crying.

“I tried to calm him down,” Moore said. “I showed him some photos of the river, of the river at night. At one point I said, ‘Don’t worry. Everything’s going to be OK.’ ”

He regretted saying that, he said.

“I have no way of knowing if things will be OK.”

By now he understood that this assignment would not be like any other. The emotions surging through the women and children were already leaking behind his camera lens.

The secretary of homeland security has suggested that the nearly 2,000 children who have been seized at the border since April were taken for their own safety. How could the government know that their parents were not their captors?

As the guards lined up the families on Tuesday night, Moore saw a woman breast-feed a toddler in the middle of the road.

“There was no place for privacy,” Moore said, so she did it in the headlights of Border Patrol vehicle.

There was something about the way she held the girl, the nervous energy in their physical bond, that made him approach them.

“I made eye contact with the mother and started taking a few pictures,” Moore said. In Spanish, she told him the barest essentials of their story.

Her daughter was 2, Moore said. “She said they’d been on the road for a month, and they were from Honduras. I can only imagine what dangers she’d passed through, alone with the girl.”

Moore had been to Honduras; it is a place so dominated by gang violence and poverty that National Geographic once wrote the country’s people have lost “their right to grow old.”

Moore had been at the river for seven hours by then. And although he had taken many photos, he did not yet have the one he needed. “I still had no picture that conveyed the emotional impact of family separations,” he said.

In an hour or two, his Border Patrol escort’s shift would end and he would have to leave. So he asked the Honduran woman if he could accompany her and her daughter for the rest of their processing. She allowed it.

All around them, other families were being questioned and searched. When the agents were done with them, they were loaded into the back of a van, to be taken to whatever fate the U.S. immigration system had in store.

The Honduran mother crouched in the dust as she waited for her turn, eyes level with her daughter’s. In Moore’s photo, it looked like she was tying the girl’s shoes. But she was not.

“She’s unlacing them,” Moore said. “Border Patrol confiscates all personal items from everyone. They take hairbands, they take shoelaces, they take belts, they take money, they take wedding rings, they take all personal items. They took the shoelaces from the children.”

The mother put the laces in a clear plastic bag labeled “Homeland Security.” She put in it everything they had carried with them for 1,500 miles, and then agents dropped the bag onto a pile of other bags, and then it was the mother’s turn to be searched.

Moore was kneeling in the road about six feet away. Most other families were already in the van. He knew that whatever photos he took next would be his last before he returned to his hotel room, then flew home to Connecticut and his own children.

“It was very quick,” he recalled. The mother set the girl down, and an agent began to run gloved hands across her body.

Immediately, the girl began to scream.

“I wanted to stop her crying,” Moore said. He imagined the guards might have wanted that, too; he had seen them joke with other children during searches, to distract from what was happening to their parents.

But it all happened so quickly, and the girl’s despair was so complete in those few seconds.

“The mother stoically had her hands against the vehicle, and the girl was crying,” Moore said. “Neither were saying words. Nothing could be said with her. She needed to be with her mother.”

He took two shots, moments apart. He understood at once that they were the photos he had been waiting for — for hours, if not years. Both images would become symbols of what the U.S.-Mexico border has become under President Donald Trump.

And then the woman picked up her daughter, they walked into the van, the van drove away, and Moore never saw them again.

He began to breathe very heavily and feel things he had not felt in years. He had to think back to his time in war zones and Ebola wards to remember a similar feeling.

In his head, he weighed the girl’s chances. According to new federal policies, he said, she would be taken from her mother when the van reached its destination. They would not be reunited until their case had wound through the courts, and then likely only to return to the country they had fled.

He wanted to be optimistic — to believe that for some reason the girl would not have to spend weeks or months in the state of mind he had witnessed for only a few seconds, when she stood by herself in the road.

“I don’t know what the truth is,” Moore said. “I fear they were split up.”

Anyway, the assignment was over. Moore filed his photos the next morning and flew home. Between then and now, he has seen his children.