The Reagan administration, at a time of strained relations with American Indians, is supporting legislation to return 25,000 acres of a national forest in New Mexico to a small Indian tribe that claims to have owned it since 1744.

The White House endorsed the measure at the urging of Interior Secretary James G. Watt, over strong objections from the Agriculture Department, which manages the national forests. The high-level help for the Pueblo de Cochiti Indians comes after three years of deep budget cuts in federal aid to Indian reservations, which many tribal leaders have attacked.

"We believe that failure to return this land would be a grave injustice to the Pueblo de Cochiti," Ken Smith, the assistant interior secretary for Indian affairs, told a House committee in announcing the administration's support for the bill. Aides to Watt said he persuaded the White House to support the measure, which the administration initially opposed, about half an hour before Smith's testimony.

As interior secretary, Watt is trustee for American Indians, and at times has been under as much fire from Indian leaders as from environmentalists. He has recently moved to moderate his image among conservationists, and is also seeking to mend fences with Indians, several interior officials said.

The Pueblo de Cochiti, a tribe of 910 members living on a 28,776-acre reservation in north central New Mexico, has for more than 200 years claimed ownership of a 25,000-acre stretch of scrub pines in the Santa Fe National Forest, known as the Santa Cruz Spring Tract.

The Cochiti have a deed indicating they bought the land in 1744. A Spaniard named Luis Maria Cabeza de Baca obtained the tract in 1805--by fraud, the Cochiti contend--and the U.S. government took it over in 1848 when Spain ceded much of what is now the western states under the Guadalupe Hidalgo treaty.

The Agriculture Department now leases much of the tract as grazing land for $5,000 a year, but officials say the land has little economic value since it has no timber. It has great spiritual value to the tribe, however, according to Cochiti governor Daniel Chalan, because it contains ancient shrines precious to the Indian culture.

"We want free access to our shrines," Chalan said. "We worship there. For us it's like going to church."

New Mexico state courts have refused to recognize the Pueblos' claim, and the case appeared closed until 1979, when University of Colorado Prof. William B. Taylor came across a long-lost Spanish colonial court judgment voiding the de Baca deed as a fraud. Taylor said he found the 1818 paper in government archives in Guadalajara, Mexico.

Since the court case cannot be reopened, the administration is asking Congress to return the land through legislation. Smith said the tribe's land claim is unique among the many filed by Indians, the only known instance of a tribe holding a paper title to the land it claims.

However, the Agriculture Department has sternly opposed the legislation, saying many Indian tribes hold claims stronger than the Pueblo de Cochiti's, although not in writing, to lands taken from them. Agriculture Department lawyers contended the measure would set a precedent for these other claims, affecting millions of government acres.

The Sandia Pueblo have claimed 9,000 acres of national forest land near Albuquerque, charging that the United States conducted an incorrect boundary survey on it. The Confederated Salish and Kootenai Tribes of the Flathead Indian reservation have claimed 10,505 acres of national forest in Montana on the same basis.

In Rhode Island and New York, tribes are seeking the return of tens of thousands of acres of privately owned property on the grounds that states did not comply with federal laws when mapping the lands.

Agriculture Department lawyers said these claims may be stronger than the Pueblos' since they involve alleged wrongs committed by the federal and state governments rather than by the Spanish Empire. The lawyers also questioned the validity of the 1818 Spanish court decree against de Baca, saying there may be other lost papers that appealed it or nullified it.

The White House sided with the Agriculture Department's position until the morning of the July 26 hearing on the bill, and had signed off on draft testimony opposing it, several officials said. According to that testimony, the bill could "set a very undesirable precedent . . . . Land claims cannot be reopened every time a newly discovered document purports to provide new evidence. At some point, there has to be a halt."

Watt, armed with an Interior Department solicitor's opinion, persuaded the administration to switch positions at the 11th hour. He and his lawyers contend it would set no legal precedents because of the unique title.

"At a time when there is much tension in the Indian community over necessary reductions of the federal level of support for Indian programs," a Cochiti lawyer wrote last year in a letter to Watt aide Stephen Shipley, ". . . such a demonstration of commitment to Indian rights would . . . get wide favorable acceptance and recognition in the Indian community."

Assistant Agriculture Secretary John B. Crowell Jr., who oversees the Forest Service, has appealed to Watt to change his stand, but interior officials said Watt is not budging. They noted that the Cochiti will pay a considerable sum to regain the land, even if the bill passes.

The tribe has agreed, under the legislation, to buy out all the grazing rights leased by the Agriculture Department to ranchers in the area. This will cost about $450,000 over a period of 50 years, according to the tribe's lawyers.

One of the ranchers, Lorenzo Armijo, said the tribe will pay him $62,000 for his grazing rights and in addition will not ask him to cede them for at least 30 years.

"It's very generous," said Armijo. "It's their land, isn't it? Why should they pay so much just to get it back? I told them they should've tried for a better deal."

"They're not asking anyone to do anything for them," said the tribe's lawyer, Jerry C. Straus. "The bill we put together was a bill we thought the administration would support and the Congress would pass. It's not perfect, but they want the land back and they're willing to make major sacrifices to get it."