Cast in the good-guy role of stopping Internet cigarette sales to children, Maine's deputy attorney general got roughed up Wednesday by several Supreme Court justices who suggested the law is not on his side.

Maine's deputy attorney general, Paul Stern, argued that Maine, like many other states, is trying to keep tobacco out the hands of underage smokers and that it cannot be done without the help of companies that deliver cigarettes bought over the Internet.

Congress has encouraged the states "to deal with the significant public health problem of youth access to tobacco," Stern told the court, arguing for the state's right to regulate shipment of cigarettes purchased over the Internet.

Shipping industry associations are challenging Maine's law, objecting to delivery requirements that they say only the federal government can impose.

Federal law bars states from regulating prices, routes or services of shipping companies and Maine's law "certainly relates to the service" of the shipping companies, said Chief Justice John Roberts.

"It talks about what carriers have to do," Roberts added.

Recent research compiled by anti-smoking groups says children as young as 11 were successful more than 90 percent of the time in buying cigarettes over the Internet. At last count, there were 772 Internet cigarette vendors, a nearly nine-fold increase in seven years.

In 2002, at the start of the boom in Internet cigarette sites, a study found that Internet vendors sold 400 million packs of cigarettes a year, 2 percent of the cigarettes consumed in the United States, a figure that anti-smoking groups say is growing.

Underlying the case is the issue of uncollected state taxes. One study found three-quarters of Internet tobacco sellers say they will not report cigarette sales to tax collection officials. A private research firm found states lose as much as $1.4 billion annually in uncollected tobacco taxes through Internet sales.

The lost revenue is a concern to Maine and about 40 other states that have tried to prohibit or severely restrict the direct delivery of tobacco products to consumers.

The differences in the state laws are a burden to business, several justices suggested.

"What if every state enacted a slightly different law relating to this and a slightly different law relating to every other product that they might want to restrict for health or safety reasons?" asked Justice Samuel Alito.

The purpose of the federal ban on state regulation of interstate shipping, "it seems to me, was to end the economic effects of state patchwork transportation regulation," said Justice David Souter.

If Maine's tobacco delivery law is not tossed out, "there will be different delivery laws in states across the country, and that patchwork will eliminate the efficiency and the cost savings that was Congress' intent," said attorney Beth Brinkmann, arguing for the transport associations.

Maine says delivery companies must check packages against a list from the state of known unlicensed tobacco retailers. The shipping companies must deliver only to the person to whom the package is addressed and a recipient under age 27 must present identification before the package can be delivered.

Facing legal trouble in New York state in 2005, United Parcel Service Inc. agreed to stop shipping cigarettes to individual consumers in all 50 states. The company says it did so because of the varying state laws. FedEx and DHL have signed similar agreements.

Maine's law has been rejected by two lower federal courts.

The case is Rowe, v. New Hampshire Motor Transport Association, 06-457.