WASHINGTON — American and Mexican officials appeared at odds Saturday over the possibility of a deal that could prevent asylum seekers from reaching the United States.

Two Trump administration officials told NBC News that the deal with Mexico's recently elected government would force asylum seekers to remain in Mexico while U.S. courts process their claims. The officials added that operational and legal details are being worked out, and the deal is still at least few weeks away from going into effect.

But on Saturday afternoon, Jesus Ramirez Cuevas, a spokesman for recently elected Mexican President Andrés Manuel López Obrador, denied to NBC News any such agreement and insisted talks of such a deal were premature.

First reported by the Washington Post, the plan is called "Remain in Mexico" and incoming Mexican officials considered it a "short-term solution."

The plan to keep asylum seekers within Mexican borders would be a change from the current system that allows asylum seekers to remain in the U.S. while their cases are being processed in American courts. Its aim is to deter migrants from coming to the United States.

Before this latest swell of migrants at the border, the average wait time for an immigration hearing was over two years, during which migrants could remain in the United States. There is no indication whether this new plan would speed up this process.

“The medium- and long-term solution is that people don’t migrate,” Olga Sánchez Cordero, Mexico’s incoming interior secretary, told the Washington Post. “Mexico has open arms and everything, but imagine, one caravan after another after another, that would also be a problem for us.”

In a statement to NBC News later Saturday, Sánchez Cordero denied there was a deal.

"There is no agreement of any kind between the future federal government of Mexico and the United States of America," she wrote. "The new government will begin its mandate on December 1."

Sánchez Cordero added that the incoming government would be focused on protecting asylum seekers' human rights and well being.

"The future government does not consider in its plans that Mexico assumes the status of 'safe third country' for the attention of Central American migrants, or of other countries, who are in Mexican territory, or for those who do so in Mexico," the statement added.

President Donald Trump tweeted Sunday that it would be "very SMART" if Mexico would stop so-called migrant caravans "long before they get to our Southern Border, or if originating countries would not let them form (it is a way they get certain people out of their country and dump in U.S. No longer)."

He then said without evidence that the Democrats had created the problem.

Would be very SMART if Mexico would stop the Caravans long before they get to our Southern Border, or if originating countries would not let them form (it is a way they get certain people out of their country and dump in U.S. No longer). Dems created this problem. No crossings! — Donald J. Trump (@realDonaldTrump) November 25, 2018

Trump also appeared to address the possible agreement on Twitter Saturday, saying, "Migrants at the Southern Border will not be allowed into the United States until their claims are individually approved in court."

"We only will allow those who come into our Country legally," Trump stated. "Other than that our very strong policy is Catch and Detain. No 'Releasing' into the U.S."

The president added that he would shut down the border "if for any reason it becomes necessary."

A Trump spokesman said Saturday that the administration is looking forward to working with the incoming Mexican president.

"President Trump has developed a strong relationship with the incoming Obrador Administration, and we look forward to working with them on a wide range of issues," said White House Deputy Press Secretary Hogan Gidley.

In Tijuana, Mexico, conditions are worsening. Almost 6,000 Central American migrants are spread throughout several shelters in the city. Tijuana’s mayor is calling the situation a “humanitarian crisis” and appealing to the united nations for help.

Inside Tijuana’s largest shelter — a rundown sports complex — there are almost 3,000 people cramped inside the space. Families are side by side on the dirt baseball field where children are sleeping on the ground. They’ve made themselves tents using tarps, plastic garbage bags and twigs.

Mothers won’t let their children outside of the shelters in Tijuana. Rumors are that drug cartels roam freely and kidnappings occur often in the city.

While Mexican federal soldiers and local police are stationed outside the shelters to protect the migrants, many leave the shelter to get a break from the cramped conditions.

In 2017, Tijuana registered one of the steepest homicide increases in Mexico. A record 1,744 homicides — almost double the 910 homicides in 2016, according to the Baja California Attorney General’s Office.

There is fear among the camp that people may be forced to stay here for as long as six months.

Evelyn Martinez, eight-months-pregnant and traveling with her seven-year-old son Netty, said she doesn’t care how long she has to wait. The two arrived in Tijuana five days ago. “Even if it’s as long as a year,” Martinez said, “we’ll wait as long as it takes.”

But not everyone is so patient.

A group of men walked around the camp with a large sign encouraging people to join them tomorrow, Sunday, at 5 a.m. PT (8 a.m. ET), when they will walk to the Port of Entry and attempt to cross into the United States.

Two unnamed senior officials from López Obrador's incoming administration told the Post that this deal would little more than formally introduce a plan for something that was already occurring.

Though asylum officers and other immigration officials have received guidance that the plan's new procedures could be adopted soon, officials from both governments told the Washington Post that there are important pieces of the plan that remain unresolved — such as the U.S. requesting further assurances that Mexico will not mistreat the asylum seekers or deport them before their claims are resolved.

The new policy could affect the San Ysidro port of entry that lies between San Diego and Tijuana.

Julia Ainsley reported from Washington. Annie Rose Ramos reported from Tijuana, Mexico.