Interior Secretary William P. Clark has told President Reagan he is resigning his post to return to his California ranch.

"My task at interior is substantially complete so it's time to go home to California," Clark said.

Clark, a trouble-shooter for Reagan and important member of his inner circle for 18 years, kept his plans from all but a handful of friends. He told Reagan of his intentions over the weekend here in Palm Springs, where the president is vacationing during the new year holiday.

The unexpected departure of Clark is likely to come as a blow to administration conservatives, who had hoped he would stay on at the Interior Department and eventually become White House chief of staff if that position is vacated by James A. Baker III being named to a Cabinet post.

But, in conversations with intimates during the past several months, Clark has expressed a desire to return to his 888-acre barley and cattle ranch northeast of Paso Robles in central California.

In confirming that he would leave the administration, Clark said today that he has set no firm date for his departure but expects to be gone by early spring, probably late in March.

Although Clark is said to have told Reagan that he would be available for specific assignments from time to time, he also has made it clear that he has no desire to return to a post in Washington or to serve on the federal bench.

Clark, 53, a lawyer, has served as a key operative for Reagan since the early days of his California governorship.

In 1967, at a time the governor's office had been rocked by a scandal and the Reagan administration in California was in disarray, Clark moved in as executive secretary, the chief of staff's job, and restored order and interoffice harmony.

In 1973, when Reagan was concerned by what he perceived as the liberal drift of the California Supreme Court, he named Clark as a justice.

Clark became a conservative rallying point on the court and a focus of controversial struggles with Chief Justice Rose Bird.

In 1980, during Reagan's campaign for president, Clark joined with other Californians in helping to replace John P. Sears with William J. Casey as campaign manager. Subsequently, after Casey was appointed director of the Central Intelligence Agency, he and Clark became firm allies in the Reagan administration.

Reagan brought Clark to Washington, using White House counselor Edwin Meese III as his emissary, in 1981 to become deputy secretary of state.

In that role Clark became Reagan's personal watchdog at the State Department, where then-Secretary Alexander M. Haig Jr. was embroiled in disputes with the White House staff. Clark often took Haig's side in these clashes with Baker and other White House aides.

But after Clark became national security affairs adviser three years ago today in Palm Springs, he became a catalyst in the process that eventually led to Haig's resignation and replacement by George P. Shultz as secretary of state.

Clark's tenure as national security adviser was a stormy one, with Baker and Shultz privately complaining that he was trying to direct Central American policy from the White House.

Often, he was allied with Casey and with Defense Secretary Caspar W. Weinberger, another veteran of the Reagan administration in California. Clark supported Weinberger's repeated and largely successful attempts to win defense budget increases.

But Clark and Weinberger, again in conflict with Shultz, were unsuccessful in their efforts to prevent a deployment in force of U.S. Marines to Beirut where 243 servicemen were killed in a bombing attack in October 1983.

By the time of the bombing, Clark had left the National Security Council job, which he found wearing and where he was under increasing pressure from Baker and deputy chief of staff Michael K. Deaver.

In September 1983, Clark replaced the controversial James G. Watt as interior secretary after Watt resigned under pressure over a remark that slurred minorities and the handicapped.

Even Clark's critics in the administration have praised his performance at the Interior Department, where he defused many of the criticisms created by Watt's confrontational style while still moving to follow the Reagan policy of opening more lands to resource development.

Since Reagan's reelection last November, Clark has removed several key assistant secretaries at the department.

While he has told the president that he will stay until the current reorganization is completed, Clark said he would leave the task of finding replacements for these posts to his successor.

Clark's departure marks a period of turnover in which Californians long associated with Reagan are changing jobs or leaving the administration.

Deaver, the aide considered closest to the president and Nancy Reagan, is expected to take a Washington public relations post in April.

Attorney General William French Smith, who was Reagan's personal attorney in California, has said he will leave for his Los Angeles law firm as soon as attorney general nominee Meese is confirmed by the Senate.

These changes would leave Reagan without any of his California aides in the top ranks of the White House staff; Weinberger and Meese would remain as the only holdovers in the Cabinet from the president's California days.