TIJUANA, Mexico — More than a hundred migrants who made a grueling journey to the U.S. border were stranded on the last leg of their trip on Monday as they waited to plead their case to seek asylum after immigration officials said the crossing was at capacity.

The roughly 150 migrants, many of them women and young children, slept outside the San Ysidro port of entry, near San Diego, after immigration officials said the crossing was not processing additional asylum claims for people without documentation on Sunday. About 40 of the migrants actually made it right just behind the turnstiles to the port of entry before not being admitted. Many were crying when they were told they would not be able to apply for asylum that day. The group had still not been allowed to enter as of Monday morning.

“They were upset ... but they were also very insistent that they would do whatever needed to be done to get to a place where they would be safe,” Alex Mensing, of Pueblo Sin Fronteras, a group that helped organize the caravan, told NBC News Monday morning.

How long the asylum seekers will have to wait to plead their case is just the beginning of the uncertain and potentially monthslong process ahead of them. The port of entry remained at capacity Monday morning, an official with Customs and Border Protection said in a statement.

A migrant who gave her name as Katherine was hoping to seek asylum with her baby girl, Ashley, after fleeing gang violence in Honduras. But on Monday morning, she had to take Ashley to the hospital after the little girl developed a fever. The two had slept in the cold on a concrete floor outside the port of entry.

"We don’t know when food will arrive, we don’t know when medical care will get here, we don’t know what’s next," said Katherine.

She broke down crying the day before after learning she would not be allowed to make her claim for asylum that day. She said she was seeking asylum after gang members came after her and her daughter because her boyfriend owed them money.

"They'd kill me, they’d kill my daughter if I didn’t pay for their protection," Katherine said.

Erika Pinheiro, an immigration attorney helping the migrants, said no one was sure when officials would begin to process the asylum seekers.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"They've decided that they're going to stay camped out outside of the port of entry until they're accepted," she said. "As terrible as the conditions are for them here, it's much better than being back in their countries of origin."

The group has been working to get additional blankets, tarps and food for the asylum seekers, she said, and some of the migrants took turns distributing food and staying up overnight for safety.

The migrants “may need to wait in Mexico as CBP officers work to process those already within our facilities,” Kevin McAleenan, the commissioner of Customs and Border Protection (CBP), said in a statement on Sunday.

“As sufficient space and resources become available, CBP officers will be able to take additional individuals into the port for processing,” McAleenan said.

Scores of Central Americans, in Tijuana on Monday, spent weeks traveling across Mexico to ask U.S. authorities for asylum. David McNew / Getty Images

Mensing said the group was prepared to wait outside the port of entry and was willing to risk the hurdles ahead because they were fleeing violence and persecution in their home countries. Many of the migrants are from Central America, predominantly Honduras.

“No one is asking for some sort of immediate citizenship — the people on this caravan know that the most likely thing for them is that they will be detained indefinitely, they may be separated from their children,” said Mensing. “They’re not coming here because they think it’s easy, they’re coming here because they’re fearing for their lives.”

Benjamin Johnson, executive director of the American Immigration Lawyers Association, told NBC News that in previous situations where a port of entry did not have enough room for a large number of people seeking asylum, numbers were distributed giving people appointment dates to come back.

"It seems their response is to say, 'no more room at the inn.' I've not ever heard of that happening before," Johnson said. "They have a legal obligation to review the cases of people seeking admission to the United States."

"There are people whose lives depend on the asylum system," he said.

The Trump administration has described the group as a threat, and Attorney General Jeff Sessions called the caravan "a deliberate attempt to undermine our laws and overwhelm our system."

The asylum seekers began their trek together near the Guatemalan border on March 25, making their way on foot, by train and by bus north through Mexico before coming to their destination at the U.S.-Mexico border in Tijuana. At one point the caravan numbered roughly 1,200, but its numbers have dwindled after some chose to seek asylum in Mexico and others decided not to risk turning themselves in to immigration authorities.

Asylum is a form of relief recognized under international law. People may seek asylum in the United States if they have been persecuted in their home countries or fear persecution based on their race, religion, nationality, membership in a particular social group, or political opinion.

The migrant families will have to make their asylum claim at the border to an officer with Customs and Border Protection, who refers them to the U.S. Customs and Immigration Services. If the migrants pass a credible-fear interview and immigration services find their claims to be credible, they will then be referred to an immigration court, where they will be allowed to plead their case to a judge.

While that claim is being processed, they will likely be held in detention, although some are assigned to a resettlement agency or sponsor that helps them find housing and employment. The process could take several months or even longer.

Immigration judges vary in whether they accept claims based on fear of violence in El Salvador, Guatemala and Honduras. Some judges permit asylum for women and children targeted by criminal gangs for recruitment, finding that they are persecuted due to "membership in a particular social group," but other judges do not.

A person granted asylum is authorized to work in the United States, apply for a Social Security card, and petition to bring family members to the United States. After a year, they may apply for lawful permanent resident status and can apply for citizenship four years later.

Annie Rose Ramos reported from Tijuana, and Daniella Silva from New York.