The Supreme Court, ruling in favor of one of the most far-reaching U.S. land-use laws ever enacted, yesterday upheld the constitutionality of the federal government's strict controls on strip mining.

The court reversed two lower-court rulings, including one in Virginia, that nullified major portions of the act as unwarranted intrusions on the rights of states to regulate land use and on the rights of coal-mining companies to exploit private property.

Congress has broad power to control the environmental consequences of private business, the court said, regardless of whether it preempts the role of state governments.

Yesterday's unanimous judgments preserved the strip-mining law. But the Reagan administration, as part of its budget cutting and overall retrenchment in regulation, has indicated that it may not enforce it as vigorously as in the past.

The law, the Surface Mining Control and Reclamation Act, was enacted in 1977, in response to mounting concern over the impact of strip mining. Strip miners reach their coal by scraping and removing the earth's surface with giant machinery, leaving great scars and massive heaps of soil and rock.

Congress concluded that strip mining pollutes the water, destroys the land, and increases damaging floods and landslides. The law was intended, in part, to prevent disasters like the 1972 Buffalo Creek, W.Va., flood that killed 124 persons and left 4,000 homeless.

The law required, among other things, that some strip-mined land be restored to its original contours after mining. It banned surface mining entirely in some areas near schools, highways and buildings and created special pre-conditions to stripping in farmland regions.

The law required the states to develop their own plans for regulating strip-minning. If the state plans were unacceptable to the secretary of interior, it empowered the federal government to do the regulating. The government could order a cessation of mining completely in emergencies and could levy fines for violations.

Coal companies, joined by the states of Virginia and Indiana, successfully challenged the law in the two separate suits. The challenges were similar to the legal battles of the 1930's and 1940's precipitated by New Deal regulatory legislation. Only this time, the result was different than it often was in those days.

The states and the coal industry first contended that Congress exceeded its constitutional authority to regulate interstate commerce. Land use, they argued, is purely a state affair.

Justice Thurgood Marshall, writing for the court in both cases, said that Congress rationally concluded that it was regulating coal-mining, a business that corsses state lines. The power to regulate such commerce is vast, Marshall said.

Even if the law did regulate land itself, Marshall said that, too, was justified under the Constitution. Federal regulatory powers are "board enough to permit congressional regulation of activities causing air or water pollution or other environmental hazards that may have effects in more than one state," he said.

Congress was not forcing anything on state governments, he said. If the states do not want to enforce the act, the law said the federal government will do it for them. Moreover, he said, the Congress has the power to preempt state regulatory activities where they involve interstate commerce.

The coal operators and the lower courts also claimed that the provisions requiring restoration of the mined lands and other restrictions on where they could mine effectively stripped them of private property rights without compensation. That is forbidden under the Fifth Amendment.

Marshall said this claim was premature, since the companies had yet to show any actual deprivation caused by the law's enforcement. The law does not violate private property rights because it still allows the "economically viable" use of the property.

Marshall also rejected challenges to the government's power to order temporary cessation of mining. He said that the government's powers to do this in an emergency are well established. The court did not rule on the challenge to the fines under the act, saying none had been imposed on the plaintiffs.

Watt abruptly issued the order terminating offices in Denver and Kansas City on Friday, a day after an appropriations subcommittee headed by Rep. Sidney Yates (D-Ill.) voted to bar use of fiscal year 1982 funds to phase out the Denver office.

An Interior spokesman said the order in question came from Andrew V. Bailey Jr., director of the Office of Surface Mining, and that it was sent to the regional offices yesterday.

"No 'reduction in force' notice was sent and it was just a question of letting them know about the reorganization," the spokesman said. "The secretary, to my knowledge, has not been involved."

The most controversial part of the plan, announced by Interior on May 20, involved a one-year phase-out of the five regional enforcement offices at Kansas City; Denver; Knoxville, Tenn.; Charleston, W.Va., and Indianapolis.

In their place, 16 new offices will be created with 14 of them serving as liaison with state officials in coal-producing states and the other two as centers for technical and engineering personnel in Pittsburgh and Casper, Wyo.