With gasoline prices up about 60 percent over last year, many are worrying that we’re returning to the 1970s, when Americans faced their first full-blown energy crisis. There was a “panic at the pump” and elsewhere as food and transport prices soared.

So what is President Biden going to do? The answer is, whatever it takes. That means releasing reserves — as he did last week — along with browbeating oil companies and pressuring petroleum producers abroad. The United States is not going to “stand by idly and wait for prices to drop on their own. Instead, we’re taking action,” the president proclaimed. Such moves reflect his political effort to balance the urgent need for bold environmental legislation with being responsive to the needs of working-class families — and making sure Americans know that he cares.

In taking this approach, Biden seems to be learning from the mistakes that hurt President Jimmy Carter. Biden had a front-row seat as the 39th president treated politics as the enemy of a good energy policy. While Carter had lots of good ideas about how to “solve” the gas crisis of the 1970s, he didn’t match that with understanding the basic pocketbook needs of working Americans — and it cost him a second term.

By the time Carter took office in 1977, inflation was running high. So was unemployment. Contemporaries coined a new term, “stagflation,” to capture this simultaneous occurrence of rising prices and stagnating employment.

To conservatives, and even to some moderate Democrats like Carter, fighting inflation took precedence over priming the pump. “We cannot afford to do everything,” a somber Carter said in his inaugural address.

Inflation only worsened, reaching a high of nearly 15 percent, driven in part by a dramatic increase in oil prices led by the Organization of the Petroleum Exporting Countries (OPEC). For the first time, consumers feared paying more than a dollar a gallon to fill up, signaling not only the tripling of gas prices in less than a decade but also more generally the decline of the United States as a global independent superpower.

In response, Carter urged Americans to sacrifice, and led by example. He turned down White House thermostats and addressed the American public wearing a cardigan sweater to keep warm. When an oil shock hit in 1979 in response to the Iranian Revolution, he famously asked Americans to stop driving so much as the solution to high prices at the pump.

Carter also believed in market solutions — even if they caused pain to American consumers. When a Democratic Congress hesitated to eliminate price controls on gas that Republican Richard M. Nixon had opportunistically adopted during the decade’s first oil shock in 1973, Carter used executive authority to get rid of them. Only higher prices would teach Americans to use less. “I’d rather do that and accept the political blame than spend another two years arguing with you about what ought to be done — when you know what ought to be done,” he told congressional leaders, as Newsweek reported in 1979.

He also appointed Paul Volcker to the Federal Reserve in the hope that he would tamp down inflation at any cost, which meant a drastic increase in interest rates at the expense of employment.

These policies reflected the reality that Carter was fundamentally a moderate-to-conservative Southern Democrat. Voters had elected him to restore morality to the White House, and he resolutely told them the unvarnished truth, showing little interest in worrying about political ramifications or making promises that he found fiscally irresponsible. “I’ll give it to you straight,” Carter said. “Each one of us will have to use less oil and pay more for it.”

This strategy didn’t work. Carter couldn’t solve the energy crisis, and he handed a new conservative coalition the keys to the White House. The energy crisis was Exhibit A for Ronald Reagan during the 1980 campaign when he wanted to claim Carter’s government was incompetent. “Carter Kiss My Gas” was a popular bumper sticker. In the end, Carter lost to Reagan in a landslide.

Biden witnessed all of this as a young senator. He joined the Senate in 1973 during the throes of the first oil shock when the Arab OPEC producers imposed an embargo on the United States because of its support for Israel during the Yom Kippur war. While moderate on cultural issues, economically, the young Biden was a New Deal liberal through and through. He instinctively sympathized with the pain that rising prices caused. In an open letter to Nixon, Biden asked “why the oil industry should be permitted to make record profits at a time when the average citizen is being told to turn down his heat, slow down his car and throw away his Christmas lights.” He also took a 15-hour ride with a truck driver to see firsthand the pain that higher fuel prices caused. “I didn’t realize the seriousness of the situation,” he said after talking to more than 300 truckers. “These guys are scared. They are confused and worried.”

In the 1974 midterm elections, Democrats swept Republicans out of office. Voters were upset about the Watergate scandal, but polls revealed that they cared just as much about the pain in their pocketbooks inflicted by inflation. And they were hopeful that Democrats, from the young Biden to the old-school liberal House Speaker Tip O’Neill, would help them out. But Carter showed little interest, instead turning into a national scold preaching tough love.

A half-century later, Biden appears to be learning from this mistake, willing to do whatever it takes to avoid a panic at the pump. That’s a lesson Carter fundamentally didn’t understand.

Sure, Carter had excellent policies. He placed the solar panels on the White House roof, supported other renewables, got excited about energy efficiency and preached the necessity of seemingly esoteric policies like cogeneration of heat and electricity in his fireside chats.

But Carter was also too far removed from the legacy of Franklin D. Roosevelt and Lyndon B. Johnson to remember that a president couldn’t tackle conservation issues without also making American working families feel economically secure and offering immediate relief to alleviate their struggling. A Southern peanut farmer, Carter was as much a part of the shift away from New Deal government — premised on the idea that government could help make life better for Americans — as the Republicans he was running against.

Biden, by contrast, came into the White House, amid the global pandemic, channeling his inner Roosevelt. He vowed the government was here to help, providing a “shot in arms and money in pockets.” And he promised massive infrastructure and social spending.

Last week’s release of oil from the nation’s Strategic Petroleum Reserve is Biden’s short-term political choice to make his long-term policy decisions possible. It also symbolizes that he won’t forget about ordinary Americans as he pushes for climate solutions within his larger infrastructure and social spending bills, including $555 billion in climate-related spending.

Biden seems to understand that he can’t repeat the mistakes of Carter. Instead of responding to the dual crises of a pandemic and climate change just with restrictions and calls for Americans to conserve, he’s pushing for infrastructure and human spending. Instead of asking people to change their wasteful ways to beat back inflation, Biden believes it’s government’s job to solve big problems and relieve pain. It’s an effective political strategy that may also smooth the transition away from fossil fuels and help Americans plan for a better future.