WASHINGTON — As the fighting between Hamas and Israel intensified, the Obama administration publicly defended Israel’s right to carry out airstrikes to stop Hamas’s rockets while privately cautioning it against ordering a ground attack into Gaza.

In a telephone call to Prime Minister Benjamin Netanyahu from China on Wednesday, Secretary of State John Kerry’s third call to the Israeli leader in four days, Mr. Kerry did not explicitly ask Mr. Netanyahu to rule out a ground attack in Gaza if Israeli airstrikes failed to stop Hamas from firing rockets, American officials said. Rather, the officials said, Mr. Kerry’s message was that the United States would try to help Israel fulfill its goal of stopping Hamas’s rocket fire without a ground assault.

Jen Psaki, the State Department spokeswoman, summed up the administration’s message. “No country should be expected to stand by while rocket attacks from a terrorist organization are launching into their country,” she said.

“At the same time, in the secretary’s conversation, in the conversations of all of our senior administration officials, they’ve been encouraging all sides to de-escalate the situation, and certainly, we don’t want to see any civilian casualties,” she added, echoing a message that has come from the White House.