The Supreme Court struggled Tuesday to find the proper balance between law enforcement’s power to search cellphones seized during an arrest and an individual’s right not to reveal the vast amount of information that can be stored there.

There did not seem to be majority support for the government’s position that there is no need for a warrant before police can examine the device. Nor did there seem to be enough votes for the other side’s position: that warrants are almost always required.

Where to draw the line seemed elusive in two hours of discussion about challenges filed by people who were convicted on evidence found in the phones they carried.

In one case, information in a phone taken from a Boston man suspected of selling crack cocaine led police to drugs and a weapon. In the other, police in San Diego, reviewing information in a phone, discovered that a man who had been pulled over at a traffic stop was a gang member linked to an earlier shooting.

The court’s examination of how to apply age-old privacy protections to a world transformed by technology produced more cosmic questions than answers.

A woman takes a picture of the Supreme Court as justices consider whether police may search cellphones found on people they arrest without first getting a warrant. (Jose Luis Magana/AP)

“What is the reasonable expectation of privacy of a person in 2014 who has a cellphone . . . on his or her person?” Justice Samuel A. Alito Jr. asked.

Justice Anthony M. Kennedy said, “I don’t think it’s odd to say that we’re living in a new world.”

Justice Elena Kagan added, “Most people now do carry their lives on cellphones, and that will only grow every single year as, you know, young people take over the world.”

Jeffrey L. Fisher, a law professor at Stanford University who is representing the gang member, said the court should extend to new technology the Fourth Amendment’s protection against unreasonable searches of “persons, houses, papers and effects.”

An arrest has never given police the authority to “search through the private papers and the drawers and bureaus and cabinets of somebody’s house,” Fisher said. “That protection should not evaporate more than 200 years after the founding because we have the technological development of smartphones that have resulted in people carrying that information in their pockets.”

Fisher seemed to have the support of the court’s two newest justices, Kagan and Sonia Sotomayor, for his argument that warrants should be required.

Both were concerned about the information available to police from someone arrested on even a minor charge.

Police would have the opportunity to “look at every single e-mail that person has written, including work e-mails, including e-mails to family members, very intimate communications, could look at all that person’s medical data, could look at that person’s calendar, could look at that person’s GPS and find out every place that person had been recently because that person was arrested for driving without a seat belt,” Kagan said.

In general, warrants are required for searches, but the court’s precedents have said that a person’s privacy expectations diminish considerably after an arrest. Police may protect themselves and others by looking for weapons or securing evidence that might be destroyed.

In past cases, searches of wallets, pagers, address books and even cigarette packages have been deemed acceptable.

California Solicitor General Edward C. DuMont noted, for instance, that police can look at photographs in a wallet. It is no different from looking at photos stored digitally, he asked.

Sotomayor replied that the difference is one of magnitude. A person’s whole life in photographs could be held on a smartphone, she said.

“You don’t see a difference between the two things?” she asked.

But Alito said that he does think there is a valid analogy with the things police can search for in a “predigital era” and that it doesn’t matter whether they now are contained in a smartphone.

Chief Justice John G. Roberts Jr. wondered about applications on the smartphone such as Facebook and Twitter, saying, “Could you have a rule that the police are entitled to search those apps that, in fact, don’t have an air of privacy about them?”

He added that it could be difficult for police trying to establish whether someone is a gang member to know what to ask for in a warrant.

Fisher replied, “Those arguments can be made on an app-by-app basis.”

Deputy Solicitor General Michael R. Dreeben told the court there was no reason to break with its precedents, which say that what someone is carrying at the time of arrest is subject to search. Cellphones can be used to facilitate criminal activity, he noted. And they can be wiped clean of incriminating evidence remotely, he said, making it important for police to seize and search them without having to obtain a warrant.

Justices often try to find compromise when faced with such decisions, but it is not always apparent in oral arguments what that might be.

At one point, Kennedy wondered whether there was a line between serious and nonserious offenses. Justice Antonin Scalia agreed that if the arrest was for not wearing a seat belt, “it seems absurd that you should be able to search that person’s iPhone.”

But the court previously has not made such distinctions, and some justices pointed out why that would be problematic.

Scalia suggested that a possibility would be limiting the search for evidence to the crime for which the person was arrested.

Even that would be damaging for the two men whose cases were before the court.

Brima Wurie was picked up in Boston on suspicion of selling crack cocaine in 2007. While he was in police custody, his flip-style phone kept receiving calls from a number identified as “my house.”

Using the telephone number and a reverse directory, police located his address, obtained a warrant to search his home, and found crack, marijuana and a weapon.

In a 2 to 1 decision, a panel of the U.S. Court of Appeals for the 1st Circuit threw out the evidence against Wurie. The majority endorsed a rule that said warrantless cellphone data searches are “categorically unlawful,” given the “government’s failure to demonstrate that they are ever necessary to promote officer safety or prevent the destruction of evidence.”

Fisher’s case went the other way.

His client, David Leon Riley, was pulled over in 2009 by a San Diego police officer for an expired registration. Police quickly discovered that Riley’s license was suspended and later found guns under the car’s hood.

Police also examined his smartphone and found language that led them to believe Riley had gang connections. A photograph on the phone linked him to a car that police said had been used to flee a shooting.

Riley was indicted on murder and other charges, convicted and sentenced to more than 15 years in prison.

A California court upheld the officers’ actions, and similar conflicting decisions have been recorded throughout the country.

The cases, United States v. Wurie and Riley v. California, will be decided before the court’s term ends in June.