Two Supreme Court cases about police searches of cellphones without warrants present vastly different views of the device.

Is it a critical tool for a criminal or is it an American’s virtual home?

How the justices answer that question could determine the outcome of the cases being argued Tuesday. A drug dealer and a gang member want the court to rule that the searches of their cellphones after their arrests violated their right to privacy in the digital age.

The Obama administration and California, defending the searches, say cellphones are no different from anything else a person may be carrying when arrested. Police may search those items without a warrant under a line of high court cases reaching back 40 years.

What’s more, said Donald Verrilli Jr., the administration’s top Supreme Court lawyer, “Cellphones are now critical tools in the commission of crimes.”

The cases come to the Supreme Court amid separate legal challenges to the massive warrantless collection of telephone records by the National Security Agency and the government’s use of technology to track Americans’ movements.

Librarians, the news media, defense lawyers and civil liberties groups on the right and left are trying to convince the justices that they should take a broad view of the privacy issues raised when police have unimpeded access to increasingly powerful devices that might contain a wealth of personal data: emails and phone numbers, photographs, information about purchases and political affiliations, books, and a gateway to even more material online.

“Cellphones and other portable electronic devices are, in effect, our new homes,” the American Civil Liberties Union said in a filing that urged the court to apply the same tough standards to cellphone searches that judges have historically applied to police intrusions into a home.

The Supreme Court is expected to resolve growing division in state and federal courts over whether cellphones deserve special protection.

In the two Supreme Court cases being argued Tuesday, one defendant carried a smartphone and the other an older and less advanced flip phone.

In San Diego, police found indications of gang membership when they looked through defendant David Leon Riley’s smartphone. Prosecutors used video and photographs found on the smartphone to persuade a jury to convict Riley of attempted murder and other charges. California courts rejected Riley’s efforts to throw out the evidence and upheld the convictions.

In Boston, a federal appeals court ruled that police must have a warrant before searching arrestees’ cellphones. Police arrested Brima Wurie on suspicion of selling crack cocaine, checked the call log on his flip phone and used that information to determine where he lived. When they searched Wurie’s home, armed with a warrant, they found crack, marijuana, a gun and ammunition. The evidence was enough to produce a conviction and a prison term of more than 20 years.

The appeals court ruled for Wurie, but left in place a drug conviction for selling cocaine near a school that did not depend on the tainted evidence. The administration appealed the court ruling because it wants to preserve the warrantless searches following arrest.