Washington (CNN) When the Trump administration first asked the Pentagon to send troops to the southern border, the administration wanted the troops to take on duties that Department of Defense officials viewed as law enforcement functions, CNN has learned.

The Pentagon said no.

According to two defense official familiar with the request, the Department of Homeland Security asked that the Pentagon provide a reserve force that could be called upon to provide "crowd and traffic control" and safeguard Customs and Border Protection personnel at the border to counter a group of Central American migrants walking to the US border to request asylum.

The Pentagon rejected the request on October 26, according to one of the officials, even as it signed off on providing DHS with air and logistics support, medical personnel and engineers.

The request was turned down because the Department of Defense felt that active duty troops do not have the authority to conduct that type of mission unless they are granted additional authorities by the President.

Defense officials have repeatedly emphasized the troops at the border are there to support civil authorities and that they are not expected to come into any contact with migrants.

Despite multiple defense officials characterizing those activities as relating to law enforcement actions, a DHS official disagreed that such functions constituted law enforcement.

"While DHS has discussed the need for potential assistance with force protection of CBP personnel, calling this line of support 'law enforcement activities' would be factually inaccurate," the DHS official said.

'Quickly and for a long time'

Active duty US troops are barred from domestic law enforcement unless there is an emergency, but President Donald Trump has repeatedly raised the prospect of having troops enforce the border as he campaigns hard on the dangers of immigration in the final days before the midterm elections.

At a White House speech on Thursday, the President suggested that troops should fire on migrants if they throw rocks, saying that rocks should be considered rifles and comparing the group of about 3,000 men, women and children to an "invasion."

On Friday, Trump tried to walk back those comments, telling reporters that "if our soldiers," or Border Patrol or Immigration and Customs Enforcement officers "are going to be hit in the face with rocks, we're going to arrest those people. That doesn't mean shoot them. But we're going to arrest those people quickly and for a long time."

The defense officials described the force DHS requested as something that would only be used if CPB personnel were overwhelmed by the situation on the border.

Even so, the Pentagon rejected the request for the reserve "protection" force, while it simultaneously approved all of DHS' other requests for support with Secretary of Defense James Mattis' approval. It's not clear if Mattis weighed in on the decision to reject the request for troops to perform law enforcement functions.

The first defense official said that in its response to DHS, the Defense Department said that if Homeland Security officials still want the reserve force of US troops, they should ask the White House to formally grant the Pentagon the authorities to perform those additional functions.

Customs and Border Protection declined to comment.

Homeland Security Secretary Kirstjen Nielsen, speaking to Fox News last week, said DHS had asked for air, engineering, logistics and planning support, as well as vehicle barriers and "ways in which we can protect my officers and agents, as well as the ports of entry themselves."

The Posse Comitatus law forbids the US military from enforcing domestic laws, unless there's no other choice. Military analysts say Trump can easily use the National Guard, US Marshals or personnel from Immigration and Customs Enforcement to back up border officers if need be.

Costs of the operation

More than 8,000 active duty troops could be deployed troops to the southwest border, more than he has serving in some of the world's most contentious combat zones, but they are there solely to support Homeland Security officials as they prepare for the migrants' arrival.

The troops will join over 2,000 National Guardsmen who are already at the border, meaning upwards of 10,000 American forces will be mobilized to stop Central American migrants that are still some hundreds of miles away from the border and weeks away from arriving in the US

Senior military officers have defended the deployment on national security grounds, but the mission -- dubbed Operation Faithful Patriot -- has been met with scathing criticism from many former military officials.

Retired Gen. Martin Dempsey, who served as the Chairman of the Joint Chiefs of Staff from 2011 to 2015, tweeted Friday that "our men and women in uniform are better trained, better equipped, and better led so they meet any threat with confidence. A wasteful deployment of over-stretched soldiers and Marines would be made much worse if they use force disproportional to the threat they face. They won't."

The Pentagon has yet to determine the cost of the operation, nor has it identified the account where the funding would come from. But the Center for Strategic and Budgetary Assessments estimates that the cost of placing active duty troops on the border could range from $42 million 110 million.

JUST WATCHED Trump: Up to 15,000 troops going to the border Replay More Videos ... MUST WATCH Trump: Up to 15,000 troops going to the border 01:56

CSBA says that on the high end, the deployment would cost $143 per troop per day for operating and maintenance costs and $112 per troop per day on the low end. CSBA also estimates that the use of military aircraft in this deployment would cost about $136,645 per day.

With the mission currently set for November 5 through December 15, for a total of 41 days, the cost of deploying 8,000 troops and air support ranges from approximately $42 million to $55 million, according to the CSBA estimate.

Trump has said the total number of troops could climb as high as 15,000 , which CSBA calculates the price tag to be at approximately $90 million to $110 million.

On Thursday, Trump claimed the military is putting up thousands of tents to hold migrants, but officials said there are no plans as of now to build tents. The officials said that while there had been informal talks between the Department of Defense and DHS about having the military build tent facilities to house detained migrants, tents were never part of the formal request for assistance submitted by DHS and approved by Secretary of Defense Jim Mattis. One official says that DHS was informally discouraged from making the request by the defense department.

CLARIFICATION: This story has been updated to make clear that the Department of Defense officials viewed the request as a law enforcement role. The Department of Homeland Security disputes that characterization, and the story has been updated with DHS comment.