Hugh L. Carey, who as governor of New York in the 1970s took control of the state’s reeling finances and was credited with saving New York City from bankruptcy, died Aug. 7 at his home on Shelter Island, N.Y. He was 92. The cause of death was not reported, but he had heart surgery last year.

Mr. Carey, a Democrat who had represented Brooklyn in the U.S. House of Representatives for seven terms, was elected governor in 1974, just as the economy was entering a recession. In his first address to the legislature, he warned that the state’s history of free spending had to stop.

“The days of wine and roses are over,” he said.

Several state agencies, municipalities and school districts were perilously close to insolvency. New York City was in dire shape, with $5 billion in debts and no way to borrow money.

Mr. Carey maneuvered the state through a series of tough choices that led to increased taxes, reduced government services and lower state and city budgets, but he managed to keep the city and state afloat.

If he had not succeeded, New York City would have gone into default, leading to possible disruptions in the nation’s financial markets and banking system.

“He saved the city and the state in 1975,” former New York mayor Ed Koch told the New York Times in 1982. “If the city had gone down, the state would have been two days behind. He did it by bringing together the best minds and making everyone work together.”

Mr. Carey, who was considered by turns brilliant, assertive, combative and erratic, had never held an executive position before becoming governor. Early in his tenure, he kept New York City going by transferring a state loan of $400 million to the city.

In May 1975, he and New York mayor Abraham Beame went to the White House to see President Gerald R. Ford, Mr. Carey’s former congressional colleague. They were joined by Vice President Nelson A. Rockefeller, who in his 15 years as New York governor had sponsored many of the ambitious building projects whose bills were coming due.

Mr. Carey and Beame asked for a federal loan of $1 billion. Ford turned them down.

Amid strikes that left garbage piled on streets and fires unattended, New York City laid off 20,000 workers. Seeing no alternative but financial ruin, Mr. Carey took unprecedented steps to manage the city’s coffers and trim its rising deficits. He named investment banker Felix G. Rohatyn his chief lieutenant. Mr. Carey directed the Emergency Financial Control Board, which seized much of the authority for the city’s budgets from the mayor’s office.

He called for higher transit fares, increased taxes and delays in repaying the city’s debt. City-run colleges, which had offered free tuition, were taken over by the state.

Still, the White House was not moved by the city’s plight.

“I can tell you, and tell you now,” Ford said Oct. 29, 1975, “that I am prepared to veto any bill that has as its purpose a federal bailout of New York City to prevent a default.”

The next day, the front page of the New York Daily News ran the memorable headline “Ford to City: Drop Dead.”

Several months later, Mr. Carey’s efforts led the Ford administration to reverse its intransigence and approve a package of loans worth $2.3 billion.

Early in 1976, several top banks began to sell $600 million in new state bonds, securing New York’s financial stability.

Reflecting on the narrowly averted financial crisis, Walter Wriston of Citibank said in 1985, “Governor Carey is the hero of this piece, any way you want to look at it.”

Hugh Leo Carey was born April 11, 1919, in Brooklyn. During World War II, he served with an Army infantry unit in Europe, where he helped liberate prisoners at a concentration camp at the end of the war. He received the Bronze Star Medal and was discharged in 1946 as a lieutenant colonel.

After the war, he graduated from St. John’s University in New York City and, in 1951, from the university’s law school. He entered a family oil-distribution business before unseating a Republican incumbent in the 1960 congressional election.

In the House, he helped pass educational legislation during the 1960s.

In 1947, Mr. Carey married Helen Owen Twohy, a widow whose husband was killed in the war. He adopted her daughter, and they had 13 children together. Survivors include 11 children, 25 grandchildren and six great-grandchildren.

His wife died in March 1974, but she had urged him to run for governor that year. He was a long shot, but infusions of cash from a rich brother helped him win the nomination and the general election.

A 1978 Washington Post profile said that Mr. Carey’s personality veered between “charming, quick-witted brilliance and flashes of outrage,” which led to frequent disputes with political friends and enemies alike. Some of his positions, including opposition to the death penalty and support for government-funded abortions, were not always popular.

His lieutenant governor challenged him in the 1978 Democratic primary, but Mr. Carey prevailed and was narrowly re-elected.

In the early 1980s, his job approval rating sank below 25 percent. In 1981, he raised eyebrows when he married a wealthy real estate executive, Evangeline Gouletas, who had passed herself off as a widow.

Reporters discovered that she had three ex-husbands. Mr. Carey became her fourth.

After leaving office in 1982, Mr. Carey worked for New York law firms and as a Washington representative of corporate giant W.R. Grace.