WASHINGTON — Amid a swirl of partisan finger-pointing on who is responsible for rising energy prices, executives of six large oil and gas companies defended themselves on Wednesday against criticisms that they are seeking to boost corporate profits by refusing to produce more oil and gas.

Trying to duck the political debate, the executives said they were not engaging in price gouging and were merely responding to global commodity prices that were out of their control. They also said they were working to shift to cleaner energy.

“We are here to get answers from big oil companies on why they are ripping off the American people,” said Representative Frank Pallone Jr., a New Jersey Democrat and chair of the Energy and Commerce Committee, during the hearing. “At a time of record profits, Big Oil is refusing to increase production.”

The oil executives took exception to the accusations by Democrats, but remained low key in their responses.

“Because oil is a global commodity, Shell does not set or control the price of crude oil,” Gretchen H. Watkins, the president of Shell USA, told the committee in her prepared remarks. “Today’s crisis and the pressure on hydrocarbon supplies and prices reveal the urgent need to accelerate the energy transition.”

Michael Wirth, Chevron’s chief executive, insisted that the company had “no tolerance for price gouging.”

With his approval ratings falling to a new low as inflation has stayed high for months, President Biden has struggled to explain the rise in gas prices to the American people. In an attempt to capitalize on broad support for crippling sanctions on Russia, the administration has tried to characterize the recent uptick in gas prices as “Putin’s price hike.”

But Republicans have tried to hang the increase around the president’s neck, noting that the price of gas has been on the rise for a year, long before Mr. Putin’s invasion of Ukraine. They have used anxiety about higher gas prices as their main argument to voters about the need for a change in leadership.

Republicans have hammered Mr. Biden for his cancellation of permits for the Keystone XL oil pipeline, as well as pauses on new leases for oil wells on federal lands. White House officials have tried to explain that neither policy is responsible for the rise in gas prices.

In reality, the loosening of pandemic restrictions has increased demand for gas when supply is not rising quickly enough. Both supply and demand are being driven by factors that are out of the control of Mr. Biden and Congress.

Still, the attacks appear to be working. In a recent Quinnipiac University poll, only 24 percent of respondents said they thought the rise in gas prices was a result of the war in Ukraine, with more Americans blaming the Biden administration’s policies.

A recent NBC News poll showed that despite broad support for banning Russian oil imports, the majority of Americans were still worried about gas prices. Polls have shown Mr. Biden’s approval ratings to be near the lowest of his presidency, at about 40 percent, suggesting that Americans hold him responsible even if they support some of his foreign policies.

Some Democrats facing competitive races in November have pushed to suspend the federal gas tax through the end of the year. But Republicans quickly shot down the proposal, calling it a desperate attempt to appeal to voters.

Progressives have also tried to use the spike in energy and gas prices to push for investments in clean energy in order to reduce the reliance on foreign authoritarian leaders and oil companies. The United Nations Intergovernmental Panel on Climate Change said in a report published this week that the world needs to significantly accelerate efforts to slash greenhouse gas emissions from oil and other fossil fuels in order to limit global warming to 1.5 degrees Celsius, or 2.7 degrees Fahrenheit.

Republicans at Wednesday’s hearing sought to capitalize on Mr. Biden’s weak position.

Credit…Sarahbeth Maney/The New York Times

“This is not the Putin price hike,” said Representative Cathy McMorris Rodgers, Republican of Washington. “This is the Biden price hike. It’s been a steady climb since he took office.” She said Democrats were seeking another scapegoat by blaming the oil industry.

Ms. Rodgers and other Republicans criticized what they called administration efforts to ease oil sanctions on Venezuela and Iran to boost global oil supplies, as well as the decision to block the Keystone XL pipeline, which would have imported more Canadian production from that country’s oil sands.

The average price for a gallon of gasoline is roughly $1.30 higher than it was a year ago, moving up in tandem with oil prices, which are now just below $100 a barrel.

Democrats have called on oil executives to suspend dividend increases and stock buybacks and invest more in developing alternative energy and reducing gasoline prices. They said their constituents were suffering and increasingly upset with oil companies over higher prices.

Last week, Mr. Biden said some oil companies had increased production but added that “too many companies aren’t doing their part and are choosing to make extraordinary profits and without making additional investment to help with supply.”

The outrage about oil company profits is not unusual. Politicians often criticize the energy industry for profiteering when gas prices surge, and then quietly drop their complaints when prices fall back. Over the last 15 years, oil and gas prices have moved up and down in three big cycles.

Most recently, energy demand quickly recovered from the lull of the early pandemic as vaccines became widely available and a crush of the infections receded. But global oil production has not completely returned to prepandemic levels. U.S. production is just shy of 12 million barrels a day, roughly a million short of the record set just before the pandemic. With oil companies adding rigs, the Energy Department expects U.S. production will surpass 13 million barrels next year.

While Mr. Biden urges oil companies to expand production, Wall Street investors are telling them to be more cautious because they don’t want companies to drill up a storm when prices are high only to lose money when prices sink again. That is what happened between 2011 and 2015, leading to scores of bankruptcies.

Right now, oil companies are making record profits. Exxon Mobil said this week that its profits in the first three months of the year could total $11 billion, the most the company has made in a quarter since 2008, when the price of a barrel of oil topped $140.

Exxon has cut spending and its work force in recent years, even while increasing production in the Permian Basin, which straddles Texas and New Mexico, and off the coast of Guyana. Darren Woods, the company’s chief executive and one of the witnesses at the Wednesday hearing, has insisted that Exxon is working to reduce its greenhouse gas emissions while meeting the country’s energy needs but that it is not responsible for rising prices.

“The uncertainty of supply in a tight market with growing demand leads to significant price volatility — which is what we are seeing today,” Mr. Woods told the committee.

Scott D. Sheffield, chief executive of Pioneer Natural Resources, a big Texas producer, said his company and others could do only so much to increase production quickly.

“I understand the desire to find a quick fix for the recent spike in gasoline prices,” he said, “but neither Pioneer nor any other U.S. producer can increase production overnight by turning on a tap.” He noted that shortages of manpower and drilling equipment, and inflationary pressures on oil services, hampered production increases.