People openly lit joints under the Space Needle and on Seattle’s sidewalks — then blew the smoke at TV news cameras. To those looking to “get baked,” the city’s police department suggested pizza and a “Lord of the Rings” movie marathon.

What, exactly, is going on in Washington state?

Marijuana possession became legal under state law Thursday, the day a measure approved by voters to regulate marijuana like alcohol took effect. It prompted midnight celebrations from pot activists who say the war on drugs has failed.

But as the dawn of legalization arrives, Washington and Colorado, where a similar law passed last month, now face some genuinely complicated dilemmas: How on Earth do you go about creating a functioning, legal weed market? How do you ensure adults the freedom to use pot responsibly, or not so responsibly, while keeping it away from teenagers?

And perhaps most pressingly, will the Justice Department just stand by while the states issue licenses to the growers, processors and sellers of a substance that, under federal law, remains very much illegal?

“We’re building this from the ground all the way up,” said Brian Smith, spokesman for the Washington Liquor Control Board, which is charged with regulating the drug. “The initiative didn’t just wave a magic wand and make everybody here an expert on marijuana.”