Police order a lingerie shop to hide its scantily clad mannequins. A judge warns female lawyers to wear head scarves in court. Beach patrols break up groups of singles and make men wear shirts.

It's all part of a new Hamas campaign to get Gazans to adhere to a strict Muslim lifestyle _ and the first clear attempt by the Islamic militants to go beyond benign persuasion in doing so.

It suggests that having consolidated its hold on Gaza in the two years since it seized control by force, Hamas feels emboldened enough to extend its ideology into people's private lives.

Hamas insists compliance with its "virtue campaign" is still voluntary and simply responds to a Gazan preference for conservative ways. But the rules are vague and there are reports of alleged offenders being beaten and teachers being told to pressure girls to wear head scarves.

The campaign highlights the differing trajectories of the West Bank and Gaza _ the two parts of the Palestinian state that the Obama administration hopes to midwife. Washington's efforts move into higher gear this week with visits by U.S. Defense Secretary Robert Gates and three top U.S. diplomats.

While Hamas pushes its dress code and Gaza remains impoverished under international embargo, West Bankers are enjoying an economic revival fed by foreign aid. Although most are conservative, there's more tolerance for a fairly large secular minority.

The West Bank's dominant party, Fatah, is making an attempt at a comeback, after suffering a stinging election defeat at the hands of Hamas in 2006.

Next week, Fatah will hold its first convention in 20 years, hoping to show that it has reformed itself, has shed its corruption-tainted image and makes an attractive alternative to Hamas.

Hamas, known for its keen sense of public opinion, pledged after its June 2007 takeover to refrain from imposing Islamic ways.

That is changing, says Khalil Abu Shammala, a human rights activist in Gaza.

"There are attempts to Islamize this society," he said. Hamas' denials "contradict what we see on the street."

The "virtue campaign" is being spread by the Religious Affairs Ministry in a list of do's and don'ts that feature on posters and in mosque sermons. It also calls for gender separation at wedding parties and tells teens to shun pop music with suggestive lyrics. "We have to encourage people to be virtuous and keep them away from sin," said Abdullah Abu Jarbou, the deputy religious affairs minister.

Another Gaza human rights activist, Hamdi Shakour, blamed the border blockade imposed by Israel and Egypt after Hamas ousted the territory's Fatah rulers. He said isolation has bred "extremism and dark ideas."

Gaza maintains small islands of secularism. Foreigners are rarely harassed, and Gaza women in stylish clothes and hairdos, many of them Muslims, frequent a half-dozen upmarket cafes and restaurants.

But Abdel Raouf Halabi, Gaza's chief supreme court judge, this month ordered female lawyers to wear head scarves and dark robes or be barred from courtrooms when their work resumes Sept. 1. "We will not allow people to ruin morals," he explained.

Only about 10 of some 150 female lawyers are affected, reflecting how deeply Islamic values already prevail. One of the unscarved is Subhiya Juma, who said the ruling "is taking away our personal freedom."

Juma said she would not wear a head scarf and hoped a public outcry would pressure Hamas officials to withdraw the order.

In government schools, head scarves for female students are supposed to be optional. But one high school has made robes and head scarves a condition for enrollment. Teachers are now being asked to pressure the girls to put them on, said Education Ministry spokesman Khaled Radi.

Police are enforcing the restrictions on mannequins and salesmen say they ripped off the tags on packages of panties and bras which showed women in underwear.

Other shopkeepers said they were told to remove the mannequins' heads so they don't violate the Islamic ban on copying the human form.

Enforcement is spotty and seems restricted to working-class markets. Most traders said they moved the mannequins back after police left.

Lingerie seller Mohammed Helu, 23, hid his under-clad mannequins but was allowed to display an outfit of a plunging top and miniskirt with the mannequin's head covered by a plastic bag.

On a Gaza beach, Mohammed Amta, 18, said a plainclothes security man told him to put on a shirt, saying his appearance was un-Islamic, and to remove his two silver rings and woven bracelet because they were a sign of Western culture.

A lifeguard said he was told to wear an undershirt and knee-length shorts. "They said that's how Muslims should dress," he said. He declined to be named, fearing he would lose his Hamas-provided job.

Last month, three young men walking on the beach with a female friend said they were beaten by Hamas police, detained and ordered to sign statements promising not to engage in "immoral activities."

The Hamas government condemned the beatings. But it remained silent when a Hamas leader, Younis Astal, accused U.N.-run summer camps for tens of thousands of children of spreading drug use and encouraging "obscene behavior" for teaching swimming and folklore dance.

Abu Jarbou, the deputy minister, insisted that Hamas would move gradually and not impose its views by force. Still, Islamic law is coming, he said.