When the government builds a dam, somebody’s going to get wet. The Supreme Court tried to decide Wednesday whether the government must pay when someone gets too wet, too often.

The Arkansas Game and Fish Commission says it is owed millions of dollars because, for six straight years starting in 1993, the federal government regularly released water from a dam in Missouri that flooded Arkansas land for three months of the year.

The stagnating water deprived Arkansas of the use of the land and destroyed more than 100,000 valuable trees, a lawyer for the state told the court Wednesday. It was the kind of “taking” of property by the government that is covered by the Fifth Amendment, Little Rock lawyer James F. Goodhart said, and it requires compensation.

But the federal government said the court’s previous rulings show that the flooding has to be permanent, not temporary, to be covered by the Constitution’s takings clause.

As Justice Stephen G. Breyer explained to Goodhart: “The problem with a flood is you don’t take all the land. You send some stuff in. And the stuff is there for a while, and then it comes back, and — it’s called water.”

An analysis of the 2011-2012 Supreme Court session, including justice voting patterns and key cases.

The justices struggled for about an hour, pushing Goodhart to define a rule that could govern a regular but temporary loss of land, and pushing back against the government’s broad declaration that it should not have to pay for the downstream consequences of its good-faith actions.

The action in the lower courts defined the dilemma. The U.S. Court of Federal Claims awarded the Arkansas commission $5.5 million in damages. The U.S. Court of Appeals for the Federal Circuit reversed, taking the position that temporary actions of the government resulting in a flood do not constitute a taking.

Goodhart said that could not be right. “The United States must provide just compensation when its direct physical invasion substantially intrudes upon a landowner’s protected property interest, regardless of the particular mode or duration of that invasion,” he said.

But several justices said the court’s precedents seemed to draw just the distinction between temporary and permanent that the appeals court relied upon. Some said it was inevitable that decisions about releasing water at the dam — for instance, to protect farmland — may have hurt someone else.

“The government generally builds dams to control that flooding to the benefit of all of the interests along its affected route,” Justice Sonia Sotomayor said. “And at some point, either the government is going to — is going to make a decision that’s going to help someone and potentially hurt someone.”

She said she worried about making all those decisions “subject to litigation.”

But Deputy Solicitor General Edwin S. Kneedler also came under heavy questioning from the court.

He said that the flooding could not be considered a taking because “there is no suggestion that it was targeted at this land,” which sits more than 110 miles downstream.

“This was an incidental consequence of what was happening,” Kneedler said.

Chief Justice John G. Roberts Jr. said the lower court found that those operating the dam did know that the commission’s land was where the water would end up. He asked Kneedler whether it would be a taking for the government to go onto someone’s land and cut down “$5 million worth of his trees. The same purpose, to assist in flood control.”

Kneedler agreed that would be a taking.

Why is it different, Roberts asked, “when they go in with a chain saw than when they go in with the water?”

Some justices also took issue with Kneedler’s assertion that living along a river “carries with it certain risks and uncertainties, from weather, from intervening causes.”

Justice Anthony M. Kennedy said, “Your position seems to be that if it’s downstream, somehow it’s not the government. There’s a series of administrative actions, and it’s not really the government’s water.”

Kennedy said that is “like the old moral of refuge that the rocket designers take: You know, ‘I make the rockets go up; where they come down is not my concern.’ ”

The case is Arkansas Game and Fish Commission v. United States.