DETROIT (AP) _ Chrysler Corp. Chairman Lee Iacocca will stay on as head of the financially struggling automaker after his contract expires in 1991, the company said Thursday.

''There's a battle raging and I'm not going to leave my troops in the field,'' he said in a statement after Chrysler's board meeting in New York.

It was unclear how long he would remain as Chrysler's chairman and chief executive officer or how much it would cost the nation's third-biggest automaker to keep him, company spokesman A.C. Liebler said.

Keeping Iacocca, 65, appears to be a stopgap move inspired by last week's resignation of Vice Chairman Gerald Greenwald, Iacocca's hand-picked successor.

''He has just said that until he and the board determine together that the company can continue to be equally effective without his personal day-to-day involvement, he will stay around,'' Liebler said.

''One other thing is to put a succession plan in place,'' he added.

A year ago, Iacocca told Greenwald that the chairmanship ''was yours to lose.'' But on May 31, it was announced Greenwald had resigned to spearhead a three-union bid to buy United Airlines for $4.54 billion.

Iacocca, who loves the limelight, has waffled recently on whether he would step down as chairman in December 1991 when his contract expires.

Unlike other auto company chairmen, Iacocca regularly appears in television commercials and in print advertising, unabashedly touting Chrysler and the United States.

He has written two books, ''Iacocca: An Autobiography,'' of which millions of copies were sold, and ''Talking Straight.'' He once made a guest appearance on the television show ''Miami Vice,'' and markets wine produced at his Italian estate.

Even if Greenwald had taken over as chairman, Iacocca had been expected to remain on the company's board of directors and play a large role in the company's future. Some analysts speculated that Iacocca's continued presence might be one reason Greenwald quit.

Less than 24 hours after Greenwald's resignation, Chrysler announced that Robert S. Miller, the company's chief financial officer, would take over Greenwald's title and most of his duties. Chrysler Motors President Robert Lutz got the rest of the duties, but no new title.

The changes prompted immediate speculation that Iacocca might seek a new contract after 1991, since neither Miller, 48, nor Lutz, 58, appeared ready to become chairman in 18 months.

The extension of Iacocca's tenure as chairman buys time for Chrysler to groom one of them or find another heir for Iacocca.

Greenwald was the highest-ranking of three executives who announced in May they would quit Chrysler. Michael Hammes resigned as vice president for international operations to head up hand tool operations at Black & Decker Corp., the Towson, Md.-based household products manufacturer, and Treasurer Frederick Zuckerman said he will quit sometime this summer.

The drain on Chrysler's executive force began last October when the company started a $1.5 billion cost-cutting program that will result in a white-collar work force reduction of more than 2,500 people.

Chrysler reported its first-quarter earnings were down 80 percent from last year to $71 million, and analysts have predicted there won't be any upturn until at least the fourth quarter.

Chrysler's sales also have taken a dive. Through the first five months of this year, Chrysler's car and truck sales were down nearly 13 percent compared with last year.

Iacocca signed a four-year contract with the automaker in 1987. He joined Chrysler in 1979 after being fired as president of Ford Motor Co. by the late Henry Ford II.

Iacocca's most lucrative year as chairman was in 1986 when he received $20.5 million in compensation. His average annual compensation since 1985 was $11.5 million. He received $4 million for last year.

The company's 1990 proxy statement says Iacocca will receive 191,250 shares of Chrysler stock this coming Nov. 2 and another 63,750 shares after Dec. 8, 1991. At recent prices, the stock would have a combined value of $4.1 million.

Iacocca's colossal compensation wasn't the only thing that put the son of Italian immigrants into the news during the last decade.

His name has popped up occasionally as a potential Democratic presidential candidate, and he made news when he collided with the Reagan administration over funding for the Statue of Liberty restoration.

He is engaged to be married for a third time after a stormy divorce that ended an 18-month marriage to his second wife, Peggy Johnson.

Mary Iacocca, his first wife of 26 years, died in 1983.